Repository navigation
Conversation
Contributor
Author
|
Hi, the Test PR run on this PR is parked waiting for a maintainer approval (first-time-contributor gate). Could someone approve it when you get a chance? Thanks. |
kddejong
approved these changes
Oct 22, 2026
The resolve:ssm: exception added for aws-cloudformation#3329 only covered LaunchTemplateData.ImageId. EC2 also resolves a Systems Manager parameter at launch for a plain AWS::EC2::Instance, and the AWS CDK emits this form there (MachineImage.resolveSsmParameterAtLaunch). Fixes aws-cloudformation#4826 Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
kddejong
force-pushed
the
fix/e1152-resolve-ssm-instance-imageid
branch
from
October 22, 2026 16:08
5f07a98 to
b67f3fd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4828 +/- ##
=======================================
Coverage 94.68% 94.68%
=======================================
Files 439 439
Lines 15973 15974 +1
Branches 3097 3097
=======================================
+ Hits 15124 15125 +1
Misses 467 467
Partials 382 382
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Fixes #4826
Description of changes:
AWS::EC2::InstanceImageIdwhen the value is aresolve:ssm:<parameter>reference. EC2 resolves the Systems Manager parameter at launch for a plain instance, and the AWS CDK emits exactly this form onAWS::EC2::Instance(MachineImage.resolveSsmParameterAtLaunch). The issue's repro template deploys toCREATE_COMPLETE.resolve:ssm:exception added for E1152 and dynamic parameters #3329 insrc/cfnlint/rules/formats/ImageId.pywas keyed to a single cfn path:Resources/AWS::EC2::LaunchTemplate/Properties/LaunchTemplateData/ImageId. The same SSM-at-launch behavior onAWS::EC2::Instance/Properties/ImageIdwas not covered, so the value fell through to the AMI id pattern check.Resources/AWS::EC2::Instance/Properties/ImageId. Any otherresolve:ssm:value (or any other location) is still validated against the AMI pattern as before.Test evidence:
test/unit/rules/formats/test_image_id.py:resolve:ssm:...atResources/AWS::EC2::Instance/Properties/ImageIdpasses. Verified it fails on the unpatched code (red) and passes with the fix (green).cfnlint.api.lint_fileon the issue's repro template: pre-fix,E1152 'resolve:ssm:...' is not a 'AWS::EC2::Image.Id' ...; post-fix, zero matches. Launch-template template still clean (regression), and an invalidImageId: ami-abcstill raises E1152.test/unit/rules/formats/: 90 passed.test/unit/rules/: 2025 passed.ruff checkandruff format --checkclean on both changed files.