Export the database stack and import its outputs as references in the web application template
A company is developing a web application's infrastructure using AWS CloudFormation. The database engineering team maintains the database resources in a CloudFormation template, and the software development team maintains the web application resources in a separate CloudFormation template. As the scope of the application grows, the software development team needs to use resources maintained by the database engineering team. However, both teams have their own review and lifecycle management processes that they want to keep. Both teams also require resource-level change-set reviews. The software development team would like to deploy changes to this template using their CI/CD pipeline. Which solution will meet these requirements?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The stack export and import mechanism is designed for exactly this shared-resource scenario: it lets one stack reference another stack's outputs while the stacks remain separate entities with independent lifecycles and change sets (A). trungtd identified why the alternatives fail this requirement: a nested stack combines the stacks into a single top-level unit, which collapses the independent lifecycle and review processes the teams want to keep, and a stack set is for deploying stacks across accounts or Regions rather than for cross-stack references within one account. Option D passes values as input parameters, which is manual parameter plumbing rather than a managed reference.
Both teams must keep their own review and lifecycle processes and both need resource-level change-set review, and the software team wants to deploy through its own CI/CD pipeline. Exporting the database team CloudFormation template's outputs and importing those references into the web application template keeps the two stacks independent while giving the application template typed access to the database resources, so each team continues to review and release its own stack separately and the application pipeline deploys only its own template.
Creating a CloudFormation nested stack (B) — trungtd explained that nested stacks combine the stacks into a single stack, which complicates the independent lifecycle and review processes each team wants to maintain. Creating a CloudFormation stack set (C) — stack sets deploy stacks across accounts or Regions; they do not provide cross-stack resource references and parameters between two templates in the same account. Passing resource names and IDs as input parameters (D) — tdlAws noted this separates the management processes and minimizes hard dependencies, but it is manual plumbing of values rather than the managed reference mechanism the question describes; the export and import approach gives the same decoupling with a proper reference rather than hand-carried identifiers.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The two teams need to keep separate review and lifecycle processes while the application stack consumes resources owned by the database stack, and both need resource-level change-set review. Creating a stack export from the database CloudFormation template and importing those references into the web application template establishes a managed cross-stack reference without merging the stacks. The database stack remains an independently reviewed and released unit, and the software team can deploy only its own template through its CI/CD pipeline, which satisfies the change-set review requirement on both sides (A). A is the correct answer.Why the Other Options Are Wrong
B creates a CloudFormation nested stack to make cross-stack references and parameters available in both stacks. As trungtd identified, a nested stack becomes part of its parent stack, which combines the stacks into a single unit and complicates the independent lifecycle and review processes each team wants to keep, directly contradicting the stated requirement. C creates a CloudFormation stack set for the same purpose. Stack sets are designed to deploy stacks across accounts or Regions; they do not provide cross-stack resource references between two templates within a single account, so the mechanism described does not exist. D creates input parameters in the web application template and passes resource names and IDs from the database stack. tdlAws argued this separates the management processes and minimizes hard dependencies, but it amounts to manually threading identifiers between templates rather than using the managed export and import reference mechanism, and it does not give the resource-level reference the question describes. A is correct.Community Comment Notes
Community voted A (92). trungtd gave the decisive reasoning for rejecting B and C, that nested stacks combine all stacks into a single stack which complicates the independent lifecycle and review processes for each team, and that stack sets are typically used for deploying stacks across accounts and Regions rather than for cross-stack references. jamesf noted that A provides decoupled management where each team retains its own management process. xdkonorek2 selected A as well. tdlAws was the sole dissenter, favoring D for separation of management and minimal hard dependencies, but D relies on manually passing resource names and identifiers rather than a managed reference.Official Reference
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →