AWS Certified Developer – Associate — Question 252
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 retrieves the Region in which the template is deployed without additional configuration. Option B is less efficient as it requires manual input of the Region. Option C, while possible, involves more complexity through the use of intrinsic functions. Option D also adds unnecessary complexity by relying on AWS Systems Manager Parameter Store.