-
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
feat(ec2): support using ssm parameter to resolve AMI ID at instance launch time #26273
feat(ec2): support using ssm parameter to resolve AMI ID at instance launch time #26273
Conversation
packages/aws-cdk-lib/aws-ec2/lib/machine-image/machine-image.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ec2/lib/machine-image/machine-image.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ec2/lib/machine-image/machine-image.ts
Outdated
Show resolved
Hide resolved
packages/aws-cdk-lib/aws-ec2/lib/machine-image/machine-image.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Momo Kornher <mail@moritzkornher.de>
Co-authored-by: Momo Kornher <mail@moritzkornher.de>
Co-authored-by: Momo Kornher <mail@moritzkornher.de>
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…launch time (aws#26273) Launch Template and EC2 instance support using SSM parameter to resolve the AMI ID at instance launch time(`resolve:ssm:parameter`) rather than the CFN deploy time(`CfnDynamicReference`). This PR introduces a new support for that. - [Using SSM Parameter with Autoscaling and Launch Template](https://docs.aws.amazon.com/autoscaling/ec2/userguide/using-systems-manager-parameters.html) - [Launch an instance using a Systems Manager parameter](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html#using-systems-manager-parameter-to-find-AMI) Remove `latestAmazonLinux2022()` from the integ test as it does not return any valid al2022 images anymore as described in aws#26274 Closes aws#24551 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Any code examples to use this feature? Thanks |
const launchTemplate = new ec2.LaunchTemplate(stack, 'LaunchTemplate', {
machineImage: ec2.MachineImage.resolveSsmParameterAtLaunch('parameterName');
}); |
Make sure your SSM Param is of |
Launch Template and EC2 instance support using SSM parameter to resolve the AMI ID at instance launch time(
resolve:ssm:parameter
) rather than the CFN deploy time(CfnDynamicReference
). This PR introduces a new support for that.Remove
latestAmazonLinux2022()
from the integ test as it does not return any valid al2022 images anymore as described in #26274Closes #24551
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license