3 ms·
> the new YAML CF is better than the old JSON CF, but it’s still tough to read long complex stacks. These days I would recommend using CDK if you can’t switch
by acdha 7y ago
> the new YAML CF is better than the old JSON CF, but it’s still tough to read long complex stacks.
These days I would recommend using CDK if you can’t switch to Terraform but I would never under any circumstances recommend YAML since the odds approach certainty that the magic in the parser will cause a problem. Beyond the usual confusion around typing I’ve seen things like significant whitespace breaking functionality[1] and the shorthand types in a few cases make diffs messier. If you find an example in YAML, it takes a second to run it through cfn—flip and you’ll never have to deal with any of that.
For anyone using CF seriously, I highly recommend the cfn-python-lint tool and associated editor support. It will catch many of these cases before you burn a lengthy update cycle.
1. Fun fact: AWS’ own security alert CF stack fails the Security Hub CIS scanner because it adds extra white space the metric filters.