Q36 — AWS DOP-C02 Ch.2
Question 36 of 100 | ← Chapter 2
A company is developing infrastructure for a web application using cloud-native architecture. The database engineering team maintains database resources in CloudFormation templates, and the software development team maintains web application resources in separate CloudFormation templates. As the application evolves, the software development team needs to consume resources maintained by the database engineering team. Both teams have independent review and lifecycle management processes they wish to preserve. Both teams also require resource-level change tracking. The software development team wants to use its CI/CD pipeline to deploy updates to its template. Which solution meets these requirements?
- A. Create stack exports from the database CloudFormation template and import those references into the web application CloudFormation template. ✓
- B. Create a CloudFormation nested stack to make cross-stack resource references and parameters available across both stacks.
- C. Create a CloudFormation stack set to make cross-stack resource references and parameters available across both stacks.
- D. Define input parameters in the web application CloudFormation template and pass resource names and IDs from the database stack.
Correct Answer: A. Create stack exports from the database CloudFormation template and import those references into the web application CloudFormation template.
Explanation
This question tests cross-stack resource referencing in AWS CloudFormation architecture design. AWS CloudFormation documentation specifies that exporting stack outputs enables sharing resource attributes across independent templates—allowing teams to maintain separate, versioned, and independently deployable stacks while establishing necessary dependencies. Option A achieves this cleanly: the database team exports outputs (e.g., database endpoint, ARN), and the web application team imports them, preserving autonomy, auditability, and CI/CD compatibility. Option B (nested stacks) couples templates tightly, breaking independent lifecycle management. Option D (manual parameter passing) introduces error-prone, non-declarative coupling and bypasses CloudFormation’s native dependency resolution. Option C (stack sets) is designed for deploying identical stacks across accounts/Regions—not for inter-stack referencing within a single account. Therefore, option A is the correct and recommended approach.