ec2: public ssm parameters for container-optimized windows AMIs do not work #26689
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
needs-review
p1
Describe the bug
i have a CDK stack that looks up an AMI image from public SSM parameter like so:
that code stopped working a day or two ago, because the underlying image was withdrawn and then the SSM parameter was deleted.
I tried to update my stack to use the recommended replacement
/aws/service/ami-windows-latest/Windows_Server-2022-English-Core-ECS_Optimized
, but when i deploy this I get a parameter validation error:it looks like the Value field of the SSM parameter contains structured JSON instead of a plain string AMI id:
all of the Windows 2022 ECS/EKS SSM parameters have the same kind of structured value.
is there any way to use these SSM parameters with CDK's image lookup functions, or is this feature just broken now?
Expected Behavior
I expected to be able to deploy the stack that uses these parameters, and have the asg successfully launch instances using the referenced AMI.
Current Behavior
deployment fails with a validation error
Reproduction Steps
see the bug description
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.85.0 (build 4e0d726)
Framework Version
No response
Node.js Version
v18.16.1
OS
Linux
Language
Typescript
Language Version
5.x
Other information
No response
The text was updated successfully, but these errors were encountered: