Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to different AWS accounts #81

Open
nicmeriano opened this issue Mar 21, 2021 · 0 comments
Open

Deploy to different AWS accounts #81

nicmeriano opened this issue Mar 21, 2021 · 0 comments

Comments

@nicmeriano
Copy link

I'm having problems deploying my site to different AWS accounts for staging purposes. I have two AWS accounts, one for DEV and one for PROD. My current approach to deploy to either one is by running sls deploy --stage <stage> --aws-account <account>. Each AWS account stored within .aws/credentials is pointing to the corresponding IAM user with admin access. It seems like the --aws-account flag is being ignored and the bucket is created in the account associated with the provider account linked within the Serverless dashboard.

I also tried adding a provider for each account for my app within the dashboard following https://www.serverless.com/framework/docs/guides/providers/. By doing this I'm able to deploy other components (database, api, permissions) to the right accounts but the website component keeps failing with an Access denied error.

So am I missing something? My goal is ultimately to wire this up to a CI/CD pipeline - what is the correct way to deploy to different AWS accounts/stages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant