You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
E3010: SAM templates that expand past 500 resources pass since 1.54.0 #4883
Since #4491 (1.54.0) cfn-lint no longer runs the SAM transform, so E3010 counts Resources as written. Each AWS::Serverless::Function becomes at least two resources (the function and its role), so a SAM template that expands past 500 resources passes. CloudFormation runs the transform and then rejects the template on the 500-resource quota. Fn::ForEach output is still counted.
Expected behavior
E3010 on the template below, as on 1.53.1. The template macros page says: "Any processed template snippets must pass validation checks for a create stack, update stack, create stack set, or update stack set operation."
Reproduction template
The template has 260 SAM functions, written by this script (gen.py):
cfn-lint --regions us-east-1 -- sam-260-functions.json prints nothing and exits 0 (the same with -c I). On 1.53.1:
E3010 'Resources' has more than 500 properties
sam-260-functions.json:4:2
CloudFormation, us-east-1, 2026-10-22: CREATE_FAILED with Template format error: Number of resources, 520, is greater than maximum allowed, 500. ValidateTemplate passes, because it does not run transforms.
Related: #4607 tracks rules that lost SAM coverage after #4491; E3010 is not on its lists.
I'd like to take this on. The regression is clear: since the SAM transform stopped running in #4491, E3010 counts pre-transform resources, so the 500-resource quota check can't fire on SAM templates that expand past the limit. My plan is to have E3010 count post-transform resources (consistent with how Fn::ForEach output is already counted) without re-enabling the transform for the rest of the ruleset. PR with a regression test coming.
Activity
Varshith-Kali commentedon Oct 24, 2026
I'd like to take this on. The regression is clear: since the SAM transform stopped running in #4491, E3010 counts pre-transform resources, so the 500-resource quota check can't fire on SAM templates that expand past the limit. My plan is to have E3010 count post-transform resources (consistent with how Fn::ForEach output is already counted) without re-enabling the transform for the rest of the ruleset. PR with a regression test coming.
fix(E3010): count post-transform resources on SAM templates