Export the database stack and import its outputs as references in the web application template
Short answer
A Export the database stack's outputs and import them as references in the web application template.
Question
Key Takeaways
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.
Common mistake: 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.
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
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks-export.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks-nested.html
These links open the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
trungtd 👍 5 Answered AB. Nested stacks combine all stacks into a single stack, which can complicate the independent lifecycle and review processes for each team. C. Stack sets are typically used for deploying stacks across multiple AWS accounts and Regions D. could work but require manual intervention to update the parameter values whenever there is a change in the database stack resources.
-
xdkonorek2 👍 4 Answered AA. Create a stack export from the database CloudFormation template and import those references into the web application CloudFormation template.
-
jamesf 👍 3 Answered AA. Create a stack export from the database CloudFormation template and import those references into the web application CloudFormation template. - Decoupled Management: Each team retains its management process, aligning with their specific workflows. - Cross-Stack Referencing: Utilizes CloudFormation's Exports and Fn::ImportValue to reference resources between stacks efficiently. - Resource-Level Change Sets: Supports detailed change-set reviews, enabling teams to preview changes before deployment. - CI/CD Pipeline Compatibility: Works seamlessly with CI/CD pipelines by allowing modular updates to stacks without direct dependencies.
-
tdlAws 👍 1 Answered DOption D is the most suitable solution because it allows separation of management processes, minimizes hard dependencies between templates, and is easily integrated into the development team's CI/CD pipeline.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DOP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full DOP-C02 Practice Test →