YAML is more readable, easier to work with, easier to skim, and makes my head hurt a lot less… but beyond the glaringly obvious, what has me so pumped?

Inline Comments

“Comment your code” is the mantra we all love to pretend saves us from documentation, but with JSON you had to resort to either a build step to rip out inline comments, or just pretend the problem doesn’t exist. But those days are over, no more thousand line JSON blobs with no inline hints to help you sort out the madness. YAML supports inline comments, and it is beautiful.

Before:(Tell me: What does that security group do? What version of linux does this start?)

Cross Stack References

If you have used CloudFormation for any length of time, no doubt you have asked yourself “Why do I have to put in these parameters for stuff created by this other stack? Why can’t it just know?” We asked ourselves that. Daily.

I am proud to tell you that we started doing Cross Stack referencing before it was cool with AWS Lambda and custom backed resources. However, it was a bloated, ugly, hack of a solution. I have never been happier to take a solution out back and put it out of its misery.

Note: Yes, you could use sub-templates to get somewhat this functionality previously… but if you’ve ever used them in any kind of rapidly moving environment with lots of sub-stack dependencies, you know what I mean when I say “I don’t hate myself quite that much”.

Better “Scripts” and String Substitution

User data and cloud-init files are super handy for configuration of ec2 instances from CloudFormation templates without having to roll your own AMIs through a build pipeline. That said, the syntax in JSON for putting together those scripts was a large pile of 💩, and you can forget about any kind of useful syntax highlighting.