AWS Certified Developer – Associate (DVA-C02) — Question 89

A developer needs to build an AWS CloudFormation template that self-populates the AWS Region variable that deploys the CloudFormation template.

What is the MOST operationally efficient way to determine the Region in which the template is being deployed?

Answer options

Correct answer: A

Explanation

The correct answer is A because the AWS::Region pseudo parameter automatically provides the Region in which the template is being executed, making it the most efficient approach. Options B and D require manual input or additional configuration, while C, although valid, involves unnecessary complexity by utilizing the AWS::StackId and splitting it to obtain the Region.