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

A SysOps Administrator has written an AWS Lambda function to launch new Amazon EC2 instances and deployed it in the us-east-1 region. The Administrator tested it by launching a new t2.nano instance in the us-east-1 region and it performed as expected. However, when the region name was updated in the Lambda function to launch an EC2 instance in the us-west-1 region, it failed.
What is causing this error?

Answer options

Correct answer: A

Explanation

The correct answer is A because AMI IDs are region-specific, and the function must reference an appropriate AMI for us-west-1. Option B is incorrect since a Lambda function can launch instances in different regions if configured properly. Option C is not relevant to this failure as there is no indication of IAM permission issues, and option D is incorrect because t2.nano is generally available in multiple regions, including us-west-1.