cfn-lint
cfn-lint is a free, open-source tool for validating AWS CloudFormation YAML and JSON templates.
What cfn-lint is
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.
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.
Watch out
- Complex template value validation is best effort.
- Runtime enforcement is not supported.
- Provisioning tests and deployed checks are not supported.
Who it suits
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.
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.
Plans and prices
From cfn-lint's own pricing page, checked 2 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| cfn-lint | Free | MIT-0 licensed · Python 3.10–3.14 supported |
The facts
Each one read from cfn-lint's own pages, with the date it was checked.
What it does
- Configuration
- Users can configure cfn-lint with command-line options, configuration files, and CloudFormation template metadata.checked 2 Oct 2026
- Installation
- The project documents installation with pip, Homebrew for macOS, or Docker.checked 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.checked 2 Oct 2026
- License
- The repository identifies its license as MIT No Attribution, which grants use, copying, modification, distribution, sublicensing, and sale without restriction.checked 2 Oct 2026
- Output
- Supported output formats include quiet, parseable, JSON, JUnit, pretty, and SARIF.checked 2 Oct 2026
- Purpose
- cfn-lint validates AWS CloudFormation YAML and JSON templates against resource provider schemas and additional checks, including valid property values and best practices.checked 2 Oct 2026
- Rules
- The linter processes rules for specific checks and validations, and supports user-defined custom rules.checked 2 Oct 2026
- Runtime
- The project states that Python 3.10 through 3.14 are supported.checked 2 Oct 2026
- SAM support
- The linter supports AWS Serverless Application Model templates by transforming them with AWS SAM before processing.checked 2 Oct 2026
- Support
- The project invites users to join its Discord community to discuss cfn-lint and get help.checked 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.checked 2 Oct 2026
- Who it serves
- The project describes cfn-lint as a tool for validating AWS CloudFormation templates.checked 2 Oct 2026
The full review of cfn-lint
cfn-lint is a template validator for AWS CloudFormation and AWS SAM, best suited to teams that want checks in their infrastructure workflow. Its rules and integrations make it a practical, focused safeguard, but best-effort handling of complex values means it is not a guarantee that every expression is understood.
Overview
The linter checks CloudFormation YAML and JSON against resource provider schemas, valid property values, and best-practice rules. That focus helps catch template problems before deployment; it is not a substitute for testing provisioned infrastructure or checking deployed resources.
When it encounters complex values it cannot interpret or translate, cfn-lint does not fail for that reason alone. This avoids treating an unknown expression as a confirmed error, but means users should not read a clean result as proof that every value has been fully validated.
Key features
- Rules and customization: Specific rules perform checks and validations, and user-defined rules let teams apply their own standards. That makes cfn-lint more adaptable than a fixed set of checks, though custom rules require teams to define and maintain their own policy.
- Configuration choices: Command-line options, configuration files, and template metadata provide several ways to configure the linter, suiting both ad hoc use and repeatable team workflows.
- SAM support: AWS SAM templates are transformed with AWS SAM before processing, extending the tool to serverless templates as well as CloudFormation.
- Workflow integrations: Editor integrations cover Atom, Emacs, NeoVim/Vim, Sublime, Visual Studio Code, and IntelliJ IDEA; a GitHub Action and pre-commit hook can also bring checks into development workflows.
- Output formats: Quiet, parseable, JSON, JUnit, pretty, and SARIF output give users options for command-line reading and automated workflows.
- Policy capabilities: cfn-lint supports policy as code, policy testing, reporting, and configuration compliance for AWS. Its stated scope does not extend to runtime enforcement, provisioning tests, or deployed checks.
Pricing
cfn-lint costs nothing under the MIT-0 license. There is no paid plan or trial to weigh against its capabilities. The license permits use, copying, modification, distribution, sublicensing, and sale without restriction, making it a straightforward choice for individual and commercial use alike.
Installation is documented through pip, Homebrew for macOS, or Docker. Python 3.10 through 3.14 are supported, a practical constraint for teams choosing a Python-based installation. Users seeking help can join the project's Discord community.
Platforms
cfn-lint supports Linux, macOS, Windows, and self-hosted use. Its documented installation routes include pip, Homebrew on macOS, and Docker, so teams can select an approach suited to their environment.
Who it's for
This is a strong fit for AWS infrastructure developers and teams who author CloudFormation or SAM templates and want configurable checks before changes move through their workflow. Custom rules, CI/CD integration, and multiple output formats are useful where teams need validation to fit existing conventions and automation.
Look elsewhere if the need is to test provisioning behavior, inspect deployed infrastructure, or enforce policy at runtime: cfn-lint does not cover those jobs. It is also a focused AWS template tool, not a general validator for Terraform or Kubernetes configurations.
Pros and cons
- Pro: Checks schemas, property values, and best practices, giving template authors more than basic syntax feedback.
- Pro: Custom rules and several configuration methods let teams adapt validation to their own standards.
- Pro: SAM processing, editor options, a GitHub Action, and a pre-commit hook make it suitable for multiple points in a development workflow.
- Con: Complex values are only handled on a best-effort basis, so some expressions may not be interpreted.
- Con: It does not provide runtime enforcement, provisioning tests, or deployed checks, limiting it to template-focused validation.
Alternatives
For a wider comparison, see Infrastructure Testing Tools and Infrastructure Policy as Code Tools.
- kube-score is another free, open-source option for readers considering a different infrastructure tool.
- Conftest is a free, Apache-licensed alternative for readers considering another open-source tool.
- AWS CloudFormation is worth considering when the goal is the CloudFormation service itself; the service is free, but underlying AWS resources are billed at their own rates.
- Test Kitchen is a free, Apache-licensed alternative for readers comparing open-source infrastructure tools.
- Chef InSpec may suit readers seeking a freemium alternative with a free trial; its free plan is limited to non-production workloads and personal, non-commercial use.
- Cinc Auditor is a free distribution of Chef InSpec for readers who can accept no formal warranties or support.
- kubeconform is another free option for readers considering an alternative infrastructure validator.
- OpenSCAP is a free open-source option for readers comparing infrastructure tools.
Verdict
Choose cfn-lint if you build AWS CloudFormation or SAM templates and want configurable validation integrated into your editing and CI workflow at no cost. Its focused checks and custom rules are compelling; look elsewhere when you need tests of provisioning or deployed systems, or when complex values must be fully evaluated.
Alternatives to cfn-lint
- 1
Chef InSpec
Free planOpen sourceAPILinuxmacOSSelf-hosted8.0From $59 a year - 2

AWS CloudFormation
Free planiOSWebAPILinux7.7Free plan - 3

CIS-CAT Pro Assessor
Free planAPILinuxmacOSSelf-hosted7.7From $2,400 a year - 4
Test Kitchen
Free planOpen sourceAPILinuxmacOSSelf-hosted7.2Free plan - 5
kube-score
Free planWebLinuxmacOSSelf-hosted7.0Free plan - 6
Conftest
Free planLinuxmacOSWindows6.8Free plan
