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
- A. Use the AWS::Region pseudo parameter.
- B. Require the Region as a CloudFormation parameter.
- C. Find the Region from the AWS::StackId pseudo parameter by using the Fn::Split intrinsic function.
- D. Dynamically import the Region by referencing the relevant parameter in AWS Systems Manager Parameter Store.
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.