DEV Community 👩‍💻👨‍💻


Posted on

How to validate cloudformation templates on your computer?

Liquid syntax error: 'raw' tag was never closed

Top comments (1)

ferricoxide profile image
Thomas H Jones II

Even before I get to the point of letting AWS validate my templates, I usually run them through a local de-linter. Either jq or Python's json.tool module works a trick:

  • jq --exit-status . <FILENAME>
  • python -m json.tool <FILENAME>

Takes care of basic syntax checking. Both also work well inside a CI testing-rule (e.g., a .travis.yml file). Which means you can set up a git-trigger to only allow a branch-merge when a basic syntax check passes.

We are hiring! Do you want to be our Senior Platform Engineer? Are you capable of chipping in across sysadmin, ops, and site reliability work, while supporting the open source stack that runs DEV and other communities?

This role might just be for you!

Apply now