CloudFormation Linter configuration

CloudFormation Linter requires configuration via a .cfnlintrc configuration file as detailed in CloudFormation Linter's documentation .

Enable CloudFormation analysis

CloudFormation Linter is not enabled by default to not analyze random YAML or JSON files in your repository. If you want to leverage this Infrastructure as Code analysis, add the configuration file below to your repository. Also, specify path to your CloudFormation templates to eliminate errors from other YAML or JSON files.

.cfnlintrc

templates:
  - "**/*.yaml"
  - "**/*.yml"
  - "**/*.json"
include_checks:
  - I

Deletion Policy Example

Make sure to declare correct behavior for deletion on specific AWS resources to prevent accidental data loss.

Keep your CloudFormation template as simple as possible. Your infrastructure description becomes more clean and maintainable when you remove unneeded transformations.

AWS CloudFormation - DynamoDB deletion policy