Validate CloudFormation templates before deploy with cfn-lint
Catch CloudFormation schema, region, and intrinsic-function mistakes before a stack update fails in review or deployment.
Prerequisites
Python or cfn-lint binary, CloudFormation templates
Installation
Use the upstream install or setup path that matches your environment:
- pip install cfn-lint. If pip is not available, run
- brew install cfn-lint
- docker build --tag cfn-lint:latest .
- docker run --rm -v pwd:/data cfn-lint:latest /data/template.yaml
Requirements and caveats from upstream:
Basic usage or getting-started notes:
To get information about the SAM Transformation, run the linter with --info
Pip
Optional dependencies
Extracted from upstream docs: https://raw.githubusercontent.com/aws-cloudformation/cfn-lint/HEAD/README.md