ExamQuestions.com

Register
Login
AWS Certified DevOps Engineer Professional Exam Questions

Amazon

AWS Certified DevOps Engineer Professional

157 / 500

Question 157:

You are responsible for maintaining dozens of CloudFormation templates. Most of them use mappings to manage AMI IDs for different regions and instance types. However, the AMI IDs can change regularly, such as when there are software updates. In that case, you have to modify all related CloudFormation templates, which is very time-consuming. You are considering an automated method to query and get the correct AMI IDs for CloudFormation. Which two approaches together can help you achieve this? (Select TWO.)

Answer options:

A.Create a Lambda function to get the latest AMIs for a given region and instance type.
B.Prepare a shell script to fetch the latest AMIs for any region and instance type by using AWS CLI command such as ec2 describe-images.
C.In the CloudFormation template, create a custom resource type to invoke and send input values to a Lambda function to get the correct AMIs. After the custom resource gets a proper response, the stack proceeds with other resources.
D.Use a CloudWatch Event rule to execute a Lambda function every day to get the latest AMI IDs.
E.Add a new AMI ID parameter in the CloudFormation templates. When creating CloudFormation stacks, input the latest AMI ID parameter.