Cloudformation for my cloudformation

The problem is it will lag behind the already laughable lag which is cloud formation which is already behind boto3. It doesn’t make sense to use something so far out of date.

Any better alternatives ?

Checkout AWS’ CDK - https://github.com/awslabs/aws-cdk

Sceptre

I second this. Check the feature list. Ability to link (i.e use outputs) stacks among different accounts/regions says a lot about its power

Most of the solutions I’ve worked with seperate out the different cf templates into files and name them accordingly in order like 10- 20- etc. Then run them in order. Outputs from cf stacks stay on aws so you don’t have to re run them all in again. Say vpc stack outputs cidr ranges. The next script which creates a Nat or transit gateway will be able to use this output value even if you run it later. Terraform does this my storing it in a remote state usually in an s3 bucket. Aws stores this in cloudformstion

from the bora github page - Latest commit [7be5519](https://github.com/ampedandwired/bora/commit/7be55196618f16bb3e2b5b82ac3f723bd82c909d) on 4 Jul 2017

Use sceptre :slight_smile:

To elaborate a bit. We have over 100 accounts selfserving themselves products we define using sceptre and templating (jinja2). Sceptre supports jinja templating out of the box. Makes for very powerful IaC configurations and it combats stack sprawl like no other.

Have you used it? Because I have and I strongly disagree with this. Using the aws-cdk has been pretty damn awesome (even in its alpha state). Do agree that the lag is not ideal, since it will lag behind cfn and cfn lags in general. But the main advantage I’ve found, is that I can create abstractions over infrastructure that are driven by business logic (since rest of our stack is in JS/TS). Our infrastructure ends up being a build artifact. I just write more code and do not have to worry about defining the underlying infrastructure.

I wrote some quick jinja templates for my cloud formation templates and just render those with a slew of variables and a simple python script.

It’s not fancy but my environments don’t change that often.

Wow, that’s actually something I dont think ever crossed my mind. Thanks for the suggestion, and +1 because it reminds me of SysVinit :slight_smile:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html

There’s no right answer here; there’s a whole spectrum, with hand writing templates on one end, and auto-generating and deploying templates with custom software on the other end.

There are a whole bunch of options in the middle though, like augmenting your CF with a additional templating syntax of some type. (I’ve seen Jinja used, for example.)

I’ve seen some neat things done with troposphere, which is a python library for creating CF templates. I think python that just spits out CF hits kind of a nice balance for the whole “infrastructure as code” thing. You’re still just using vanilla CF, but you can start writing some lightweight tools to extend it. I’m planning to give this method a shot for the next project I build that needs a clean infrastructure and deployment story without anything too heavy.

Anyhow, all of this is personal preference, and the right answer depends a lot on the situation.