Cloudformation for my cloudformation

I was hoping to get some ideas/solutions people have used to manage a sprawling set if CFN stacks. Early on, we made a decision to leverage CFN as much as possible to manage deployments in AWS. After less than 12 months, despite only having a handful of apps running in AWS, we’ve got dozens of stacks deployed, managing everything from IAM roles and service accounts to RDS, networking, and other supporting services.

I was trying to get in front of managing things like intra stack dependencies (where stacks import the value from another stack), orchestration plans for more complex solutions where you need to deploy a handful of stacks in a specific order, as well as truing up deployed stacks with what’s been merged into source control.

Anybody figure out a reasonable way to do this?

P.S. “Use terraform” isn’t something we can do at this point.


Related discussions:

Check out stacker. Far and away the best tool for using cloudformation.

Are you using stack sets?

We use stacker at my company to manage hundreds of stacks and it is vastly better than raw CF. We have our blueprints in Python for common patterns to increase sharing and it helps a lot.

In a similar vein, check out Sceptre, which rivals stacker.

Check out cfn-CLI as well. Our AWS pro-services guys swear by it

That’s great to hear - adopting a more declarative approach seems to be a logical step forward.

We decided against it, mainly due to how it handles figure updates. Specifically, [having to trigger an update on the entire set just to test POC changes seems counterintuitive, and I was worried that changes in a lower environment (like POC) might inadvertently trigger an unplanned update in a PROD account.

edit:. Phone fail, I meant to respond to the comment before yours :confused:

You have everything broken up into stages and sub-stages?

The way I have our production test and Dev setup may be why I am so comfortable with it. Each lives in its own AWS account and you need to switch profiles to update anything.

We have dedicated accounts for each environment, but generally use only 1 region. Maybe I don’t fully understand stack sets, but I thought they allowed you to:

  • Deploy instances across regions
  • deploy instances across accounts

Am I missing something? Assuming you don’t have a single set that every app uses, how do you get away from having to manage a bunch of stacksets as opposed to individual stacks?

meant to pose this here instead of to /u/vitiate

We decided against it, mainly due to how it handles figure updates. Specifically, [having to trigger an update on the entire set just to test POC changes seems counterintuitive, and I was worried that changes in a lower environment (like POC) might inadvertently trigger an unplanned update in a PROD account.

Oh, I think we have a misunderstanding. Stack sets are bad. Cfn-cli is not stack sets, it’s a way of applying multiple seperate cfn templates at once in a repeatable deletable manner. Even the AWS pro services guys advise against stacksets.

Yeah, my mistake. I meant to post that in response to another comment.

Try cdk, it compiles into cloudformation, it’s from aws

Cdk is laughable.

The whole argument from AWS was “why get your team to learn yaml or json when they could learn JavaScript”

It is a stupid idea from a the team that does no work on the ground with their own product.

cfndsl + bora

We’ve been through the same pain and eventually came up with this: https://github.com/Innablr/cloudformation-seed

actually I understood it differently,
With cdk you have more flexibility as you are using a programming language and right now you can use: typescript, javascript, c#, python.
They said more in the future.
So use whatever your people know.

We use the Ansible Cloudformation module to run and manage Cloudformation templates. We also use the native Ansible Cloud modules where it makes sense.
I’m assuming you are aware of Cloudformation import and exports? This helps us with getting the values of other cloudformation stacks. The Ansible playbooks are executed as part of ourCI/CD pipeline.

Looks like something stack_master or stack-assembly can help you with.