-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ec2: public ssm parameters for container-optimized windows AMIs do not work #26689
Comments
Thanks for the bug report, you're right that the value for the parameter is now a stringified JSON, instead of just the AMI ID. This is breaking our method because we are only expecting just the ami id to be returned as a string. I'm not sure if this is expected for the parameters to contained stringified JSON now, if it is expected, then we'll need to update our context provider. If not, we should verify with the service team if this pattern is to be expected going forward |
It's not advertised, but you can add
CDK does that automatically for you if you use |
|
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: