A linter that validates AWS CloudFormation templates against AWS resource schemas and best practices.
AWS CloudFormation Linter (cfn-lint) is a Python-based tool that validates AWS CloudFormation templates against AWS resource schemas and additional checks. It helps developers identify errors, enforce best practices, and ensure template correctness before deploying infrastructure. The tool supports JSON and YAML templates, including those using the Serverless Application Model (SAM).
Cloud engineers, DevOps professionals, and developers who use AWS CloudFormation for infrastructure as code and want to validate their templates for errors and compliance with AWS best practices.
Developers choose cfn-lint because it provides comprehensive validation directly against AWS CloudFormation schemas, supports custom rules for organizational policies, and integrates easily into CI/CD pipelines with multiple output formats, reducing deployment failures.
CloudFormation Linter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Directly validates templates against AWS CloudFormation resource provider schemas, ensuring accurate property checks and reducing deployment errors.
Includes built-in rules for AWS best practices like tagging and security configurations, helping enforce standards across infrastructure code.
Supports custom one-line rules and configurable parameters via CLI, files, or template metadata, allowing organizations to enforce specific policies.
Can test templates against multiple AWS regions for compatibility and validates Serverless Application Model (SAM) templates after transformation.
The README warns it's a best-effort tool for complex intrinsic functions like mappings and joins, meaning some nuanced errors may not be caught.
Requires Python 3.10 to 3.13, which can conflict with existing environments or projects using different Python versions.
Primarily CLI-based, relying on third-party editor plugins for integrated feedback, which may add setup complexity for some teams.