In order to be able to properly diff and read your CloudFormation templates you want them to be in a harmonised shape:

  1. Validity check and indentation
  2. Apply some regex search/replace transformations to improve human readability

This can be done on the shell: nice-cf.py < template.json > beautified.json

Or in vim using a keybinding:

This is the nice-cf.py Python script used to apply the transformations to the template:

Leave a Reply

Your email address will not be published. Required fields are marked *