Skip to content

Add validation rules #4424

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:feature/error-analysis-rules
Mar 26, 2026
Merged

Add validation rules #4424
kddejong merged 1 commit into
aws-cloudformation:mainfrom
kddejong:feature/error-analysis-rules

Conversation

@kddejong
Copy link
Copy Markdown
Contributor

@kddejong kddejong commented Mar 26, 2026

Summary

Adds validation rules:

  • E3706: AutoScaling MaxSize must be >= MinSize
  • Lambda Layers maxItems: 5 schema patch
  • CloudWatch AlarmName no leading/trailing whitespace pattern
  • AutoScaling duplicate instance types via uniqueKeys on Overrides

All constraints verified against real CloudFormation deployments and AWS documentation.

- E3706: AutoScaling MaxSize must be >= MinSize (2,248 deployments)
- Lambda Layers maxItems: 5 (36 deployments)
- CloudWatch AlarmName no leading/trailing whitespace (21 deployments)
- AutoScaling duplicate instance types via uniqueKeys (142 deployments)

Rules based on analysis of 2.26M CloudFormation deployment failures.
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.48%. Comparing base (0bbabc9) to head (6ea4837).
⚠️ Report is 48 commits behind head on main.

Files with missing lines Patch % Lines
...les/resources/autoscaling/AutoScalingMinMaxSize.py 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4424      +/-   ##
==========================================
- Coverage   93.54%   93.48%   -0.06%     
==========================================
  Files         418      426       +8     
  Lines       14145    14433     +288     
  Branches     2817     2876      +59     
==========================================
+ Hits        13232    13493     +261     
- Misses        567      582      +15     
- Partials      346      358      +12     
Flag Coverage Δ
unittests 93.48% <92.85%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong kddejong changed the title Add validation rules from deployment error analysis Add validation rules Mar 26, 2026
@kddejong kddejong merged commit 5646319 into aws-cloudformation:main Mar 26, 2026
18 of 19 checks passed
@kddejong kddejong deleted the feature/error-analysis-rules branch March 26, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant