Menu

1 / 2

cfn-lint E1020: catch CloudFormation reference errors early

DEV Community: cicd·Prateek Singh·about 6 hours ago
#bXfPbDbu
#devtocicd#devto#dev#lint#review
Reading 0:00
15s threshold

TL;DR: cfn-lint catches a broken CloudFormation Ref before deployment: it reports rule E1020 and exits with code 2. You can reproduce it from two public commits without an AWS account, fix the reference, and run cfn-lint on every pull request. A clean lint run proves the references resolve, not that the stack is safe or will deploy.

By Prateek Singh, founder of Ganak AI Labs. Updated 6 October 2026.

A one-line change to an Auto Scaling group swaps !Ref PrivateSubnetB for !Ref MissingPrivateSubnetB . The YAML is valid, the diff looks harmless, and in a busy review it gets approved.

The mistake only shows up later, when CloudFormation tries to resolve a resource that doesn't exist.

This kind of error is cheap to catch before anything touches AWS.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.