Configuration Management and IaC1 / 5
A DevOps engineer needs to look up the latest AMI ID for Amazon Linux 2023 during a CloudFormation stack deployment. The AMI ID must be resolved dynamically at deployment time so the template does not need to be updated when new AMIs are released. The solution must work without any custom code or external dependencies. Which approach meets these requirements?
CorrectIncorrect
Alex
CloudFormation dynamic references with {{resolve:ssm:/aws/service/ami-amazon-linux-latest/<variant>}} resolve the latest AMI ID at deployment time from AWS-maintained SSM public parameters. No custom code, Lambda, or external dependencies required — CloudFormation natively resolves the reference during stack operations. AWS publishes current AMI IDs under /aws/service/ami-amazon-linux-latest/ for all Amazon Linux variants across all Regions. Hard-coding AMI IDs requires manual template updates when new AMIs release. A Lambda custom resource works but violates the no-custom-code requirement. Region-to-AMI condition mappings become stale and need manual maintenance. Exam tip: SSM public parameters + dynamic references = zero-maintenance AMI lookup. Ref: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references-ssm.html
Sourcedocs.aws.amazon.com
Follow-up answers are available in the app. Create a free account — no credit card required.
Question 1 of 5
Create a free account