AWS Certified Solutions Architect – Professional — Question 124
True or false: In a CloudFormation template, you can reuse the same logical ID several times to reference the resources in other parts of the template.
Answer options
- A. True, a logical ID can be used several times to reference the resources in other parts of the template.
- B. False, a logical ID must be unique within the template.
- C. False, you can mention a resource only once and you cannot reference it in other parts of a template.
- D. False, you cannot reference other parts of the template.
Correct answer: A
Explanation
The correct answer is A because in a CloudFormation template, a logical ID is intended to be unique for each resource. This means options B, C, and D are incorrect as they misstate the rules about referencing resources and the uniqueness requirement of logical IDs.