Nuts and Bolts

Everyone has opinions and thoughts. Here are some of ours.

Summarize CloudFormation Resources with jq Tip

Posted by Tung Nguyen
on
Sep 16, 2017

I’ll go over a useful way to summarize CloudFormation templates resources with jq. This is useful when you are looking at a CloudFormation template and trying to understand it. We’ll download an example CloudFormation template and use run through some useful jq commands summarize the resources defined in a CloudFormation template. Note, I’ll only show the output that is useful for understanding.

This still a lot of information at this point. Also, notice that the structure of the Resources section has a key that varies. This is called the Logical Id. This structure makes it harder to go down and inspect it further. But jq has a useful to_entries command that we can use to restructure the format to make it easier to traverse.