AWS Certified SysOps Administrator – Associate — Question 17

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 AMI IDs in the 'Mappings' section allows the template to reference the appropriate AMI for different regions dynamically. Option A is incorrect as AMI IDs are region-specific and cannot be simply copied with the same ID. Option B does not solve the issue since fully qualified AMI IDs still need to be mapped for different regions. Option C is also incorrect as it does not ensure the correct AMI is used automatically based on the region.