AWS Certified SysOps Administrator – Associate — Question 91
A SysOps administrator is creating two AWS CloudFormation templates. The first template will create a VPC with associated resources, such as subnets, route tables, and an internet gateway. The second template will deploy application resources within the VPC that was created by the first template. The second template should refer to the resources created by the first template.
How can this be accomplished with the LEAST amount of administrative effort?
Answer options
- A. Add an export field to the outputs of the first template and import the values in the second template.
- B. Create a custom resource that queries the stack created by the first template and retrieves the required values.
- C. Create a mapping in the first template that is referenced by the second template.
- D. Input the names of resources in the first template and refer to those names in the second template as a parameter.
Correct answer: A
Explanation
The correct answer is A because adding an export field allows the first template to share its resource values easily with other templates, simplifying the process. Option B is more complex as it requires a custom resource, which increases administrative effort. Option C does not facilitate direct referencing between templates as effectively as exporting outputs. Option D requires manual input of names, which is less efficient and prone to errors.