
cfn-lint
Summary
cfn-lint is a free, open-source tool for validating AWS CloudFormation YAML and JSON templates. It checks templates against resource provider schemas and applies additional validations, including checks for property values and best practices. It can process AWS Serverless Application Model templates by transforming them with AWS SAM first. The linter runs specific rules and also allows user-defined rules; configuration can come from command-line options, configuration files, or CloudFormation template metadata. Output formats include quiet, parseable, JSON, JUnit, pretty, and SARIF. Installation options documented by the project include pip, Homebrew for macOS, and Docker, and supported Python versions are 3.10 through 3.14. Listed integrations include several editors, a GitHub Action, and a pre-commit hook. The project describes complex template value validation as best effort: it does not fail only because it cannot understand or translate a value. The repository identifies its license as MIT No Attribution.
Who it is for
cfn-lint is for people validating AWS CloudFormation templates, including teams that want checks in editors or CI/CD workflows. Its custom rules and multiple output formats also suit users who need to tailor validation and reporting.
What is good
- Validates CloudFormation YAML and JSON templates.
- Supports AWS SAM templates.
- Users can define custom rules.
- Offers JSON, JUnit, SARIF, and other output formats.
- Free under the MIT No Attribution license.
What to know first
- Complex template value validation is best effort.
- Runtime enforcement is not supported.
- Provisioning tests and deployed checks are not supported.
Verdict
cfn-lint provides template checks, configurable rules, and integrations for development workflows at no cost. Its validation of complex values is explicitly best effort, so it may not interpret every value.
cfn-lint plans and pricing
All plansCompared on infrastructure testing tools
- Policy language
- AWS CloudFormation Guard DSLgithub.com
- IaC formats
- CloudFormation templates and change sets; Terraform JSON; Kubernetes configurationsgithub.com
- Policy testing
- Yesgithub.com
- Admission control
- Yesgithub.com
- Runtime enforcement
- Nogithub.com
- CI/CD integration
- Yesgithub.com
- Policy reporting
- Yesgithub.com
Facts
- Purpose
- cfn-lint validates AWS CloudFormation YAML and JSON templates against resource provider schemas and additional checks, including valid property values and best practices.github.com · 2 Oct 2026
- Validation caveat
- The project describes validation of complex template values as best effort and says it will not fail just because it cannot understand or translate them.github.com · 2 Oct 2026
- SAM support
- The linter supports AWS Serverless Application Model templates by transforming them with AWS SAM before processing.github.com · 2 Oct 2026
- Rules
- The linter processes rules for specific checks and validations, and supports user-defined custom rules.github.com · 2 Oct 2026
- Configuration
- Users can configure cfn-lint with command-line options, configuration files, and CloudFormation template metadata.github.com · 2 Oct 2026
- Output
- Supported output formats include quiet, parseable, JSON, JUnit, pretty, and SARIF.github.com · 2 Oct 2026
- Integrations
- The project lists editor integrations for Atom, Emacs, NeoVim/Vim, Sublime, Visual Studio Code, and IntelliJ IDEA, plus a GitHub Action and pre-commit hook.github.com · 2 Oct 2026
- Installation
- The project documents installation with pip, Homebrew for macOS, or Docker.github.com · 2 Oct 2026
- Runtime
- The project states that Python 3.10 through 3.14 are supported.github.com · 2 Oct 2026
- License
- The repository identifies its license as MIT No Attribution, which grants use, copying, modification, distribution, sublicensing, and sale without restriction.github.com · 2 Oct 2026
- Support
- The project invites users to join its Discord community to discuss cfn-lint and get help.github.com · 2 Oct 2026
- Who it serves
- The project describes cfn-lint as a tool for validating AWS CloudFormation templates.github.com · 2 Oct 2026
Best cfn-lint alternatives
See all 12Where it ranks on Everything Xiaomi
Is cfn-lint yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- github.com/aws-cloudformation/cfn-lint· checked 2 Oct 2026
- github.com/aws-cloudformation/cfn-lint/blob/main/L· checked 2 Oct 2026

