AWS Certified SysOps Administrator – Associate (legacy) — Question 40

A SysOps Administrator is troubleshooting an AWS CloudFormation template whereby multiple Amazon EC2 instances are being created. The template is working in us-east-1, but it is failing in us-west-2 with the error code:
AMI [ami-12345678] does not exist
How should the Administrator ensure that the AWS CloudFormation template is working in every region?

Answer options

Correct answer: D

Explanation

The correct answer is D because including the AMI IDs in the 'Mappings' section allows for the appropriate AMI to be selected based on the region where the stack is being deployed. Options A and B do not ensure the template is region-agnostic, and option C does not address the need for specific AMI IDs in the context of different regions.