A developer is managing an infrastructure deployment consisting of two separate AWS CloudFormation stacks: a network stack that exports VPC resource identifiers, and an application stack that imports these identifiers using the `Fn::ImportValue` intrinsic function. The developer needs to update the network stack's outputs to support a new subnet configuration. Which of the following are valid constraints or required actions when modifying exported outputs that are referenced by other stacks? (Select TWO.)
- The network stack cannot be deleted, and its exported output values cannot be modified or deleted as long as they are referenced by the application stack.Answer
- To modify exported values in the network stack, the developer must first update the importing application stack to remove the references to those exports.Answer
- CThe developer can run drift detection, manually modify the resource values directly in the AWS console, and then trigger a stack sync to update the cross-stack reference.
- DSensitive credentials that require automatic rotation should be stored in Systems Manager Parameter Store and shared using cross-stack reference exports.
- EIf the network stack update fails and is stuck in the `UPDATE_ROLLBACK_FAILED` state, the developer must update the referencing application stack to automatically force the network stack to rollback.
Answer
The network stack cannot be deleted, and its exported output values cannot be modified or deleted as long as they are referenced by the application stack; and to modify exported values in the network stack, the developer must first update the importing application stack to remove the references to those exports.
AWS CloudFormation enforces that you cannot delete a stack if its exported outputs are referenced by another stack, nor can you modify or delete any exported output value that is currently in use. To successfully change an exported value, the importing stack must first be updated to remove the reference to the export. Once the reference is removed, the exporting stack can be updated, and then the importing stack can be updated to reference the new export.
Step-by-Step Solution
Key Concept
AWS CloudFormation cross-stack references enforce strong dependencies, preventing the deletion of exporting stacks or modification of exported values until all referencing stacks remove their imports.
Estimated Time:2m 0s