DEV Community

Discussion on: Step-by-Step Guide: Setting Up CI/CD for AWS SAM Applications with GitHub Actions

Collapse
 
lukewelden profile image
Luke Welden

Hey, Jasper.

Great job on your first post. Some great content and references to other complementory articles. I was curious about the way you've configured three separate branches for dev, staging, and production. By the looks of the configuration you're always going to be deploying to the same AWS accout. Do you work in a way where dev, staging, and prod are all in the same AWS account? If so, how are you finding it?

We use separate AWS accounts for each environment and this throws up added complexity to our GitHub Actions Workflows. We have to make use of the upload artifacts workflow and then use different workflows for deploying into said aws accounts.

Collapse
 
kshyun28 profile image
Jasper Gabriel

Hello Luke,

Glad you found the post helpful and my apologies, saw this just now.

Yes the sample project deploys all environments on the same AWS account, though I have to admit it's not ideal.

We've had the same AWS account setup at my previous project, but we quickly found issues and moved away from it.

Instead we also used separate AWS accounts for each environment just like your team's current setup. Dev and staging are in 1 AWS account, then production is in a separate AWS account (for numerous reasons like security, billing, etc.).

Collapse
 
lukewelden profile image
Luke Welden

Hey, Jasper.

No problem at all! It's interesting that you responded to this message actually as I've recently moved over to a SAM deployment model for the same project that led me to your post.

In the end I used the sam pipeline command to create a Github Actions workflow that deploys to a test aws account and then prod aws account. I've seen better CI/CD pipeline implementation but it gets the job done!

All the best,

Luke.