DEV Community

harry
harry

Posted on

4 2

How to validate cloudformation templates on your computer?

Liquid syntax error: 'raw' tag was never closed

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (1)

Collapse
 
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.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay