If you've followed me for any length of time, then you know that I think learning AWS CloudFormation is great investment of time. In case you don't know what it is, this service / tool allows you to create entire infrastructures on AWS with nothing but a simple JSON or YAML file. This means you can do things like version control your infrastructures, relaunch them in an instant, parameterize them for dynamic reuse, and stop searching through 10+ browser tabs for that one rogue resource.
No, it's not as delicious as HashiCorp's Terraform nor is it as novel as the new AWS CDK, but dammit it's stable, consistent, and gets the job done. Oh, and by the way, if you're using the AWS CDK, ECS CLI, the Serverless Framework, or most of the setup wizards in the AWS console...guess what's in the background doing the work? CloudFormation.
For all of its shortcomings, it has a lot of things about it that no other Infrastructure as Code tool can really claim:
- CloudFormation code you wrote 10~ years ago will still work today.
- It's frequently updated to work with all AWS Services.
- You don't need to know a programming language to use it.
- It exposes you to a lot of hidden aspects and inner-workings of AWS.
- It's just JSON (or YAML) so writing custom scripts to compose it is easy.
What is this Guide?
This is a deep dive through all of the fundamentals of CloudFormation. Its purpose is to give you all the knowledge you need to understand how it works and how to create things in AWS with it. We'll do so by creating a very simple project, in order to not get distracted, and cover all of the properties, functionality, and techniques you can use.
Furthermore, we'll talk about workflows to write templates efficiently AND the "why's" behind what we do. Modern documentation tends to come in three flavors: marketing lingo, dry step-by-steps, and ambiguous jargon. We avoid that and talk about this stuff in plain English, why we make the decisions we do, and how to make decisions on your own.
How do I use this Guide?
The initial posts are something that you can read, but once we get into the templates themselves, you'll have both a video and the sample code that I'm working with. Use this post as a table of contents for the entire guide.
Although there's nothing wrong with just watching, I would suggest following along with what I do. Even if you've never written any code before this guide is more than doable. If you are familiar with AWS, and coding for that matter, then this will give you (mostly) all you need to know to start creating your own infrastructure as code.
The only thing that I WILL say is that this assumes you have some familiarity with AWS. We don't make anything crazy, so the requirements to using it aren't anything beyond having an AWS account. But, the context of its usefulness might be lost on you if you've never touched AWS before.
The Next Post - The Complete CloudFormation Guide: An Introduction to and History of CloudFormation
The Complete CloudFormation Guide Index
- The Complete CloudFormation Guide
- An Introduction to and History of CloudFormation
- The Main Concepts of CloudFormation
- How CloudFormation Does Updates and Deletes
- Our Project Setup
- Parameters and Refs
- Our First Time Launch
- Functions, Pseudo Parameters, and Conditions Part 1
- Functions, Pseudo Parameters, and Conditions Part 2
- The Best Next Steps to Take from Here
Enjoy Posts Like These? Sign up to my mailing list!
My Tech Guides and Thoughts Mailing List
J Cole Morrisonhttp://start.jcolemorrison.com
Developer Advocate @HashiCorp, DevOps Enthusiast, Startup Lover, Teaching at awsdevops.io