Describe the feature
As discussed in the cloudformation docs on the resource, the ImageId here can be a directive to an SSM resolve statement. The effect of doing this is that the Launch Template, when used to launch new instances, looks up the AMI ID from a given SSM parameter and uses that. This avoids the need to re-deploy/renew a config every time you want to update an AMI.
Use Case
We want to script the build and deployment of an AMI without the need for a full redeploy of stacks, and this is a featured already offered by direct Cloudformation.
Note one can work around this by doing e.g.
launch_template.node.default_child.add_override(
"Properties.LaunchTemplateData.ImageId", f"resolve:ssm:{ami_ssm_parameter}"
)
Proposed Solution
Not dug into the code as a whole, but the Cloudformation 'hack' is very simple, so I'd perhaps work at it from the point of view of a new parameter, exclusive with machine image, that simply updates the image id here with a resolve:ssm directive on the passed input string.
Other Information
No response
Acknowledgements
CDK version used
2.67.0
Environment details (OS name and version, etc.)
Ubuntu Kinetic, Python 3.10.7, Node 18.14.2
Describe the feature
As discussed in the cloudformation docs on the resource, the ImageId here can be a directive to an SSM resolve statement. The effect of doing this is that the Launch Template, when used to launch new instances, looks up the AMI ID from a given SSM parameter and uses that. This avoids the need to re-deploy/renew a config every time you want to update an AMI.
Use Case
We want to script the build and deployment of an AMI without the need for a full redeploy of stacks, and this is a featured already offered by direct Cloudformation.
Note one can work around this by doing e.g.
Proposed Solution
Not dug into the code as a whole, but the Cloudformation 'hack' is very simple, so I'd perhaps work at it from the point of view of a new parameter, exclusive with machine image, that simply updates the image id here with a resolve:ssm directive on the passed input string.
Other Information
No response
Acknowledgements
CDK version used
2.67.0
Environment details (OS name and version, etc.)
Ubuntu Kinetic, Python 3.10.7, Node 18.14.2