AWS Certified Developer – Associate — Question 384

A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI). The company uses AWS CloudFormation to provision the application. The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region.
An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead.
Which solution meets these requirements?

Answer options

Correct answer: B

Explanation

Amazon Machine Images (AMIs) are regional resources, so an AMI ID created in us-east-1 does not exist in us-west-1. Copying the custom AMI to the target region and updating the CloudFormation template to reference the new AMI ID is the most efficient way to resolve the error with minimal operational overhead. Rebuilding the AMI or deploying manually would require significantly more time and effort, while using a standard AWS AMI would strip away the custom configurations of the application.