Aakash Verma
Aakash Verma

Reputation: 3994

How to have one CloudFormation stack import and refer to the latest version of a resource on another stack?

I have a nested AWS SAM template and the issue is occurring when there is an export-import relation between two stacks for a resource. When the stack which has the exportable resource is modified and deployed, the stack importing it doesn't refer to the newer version of the exported modified resource.

Any way to enable it?

Upvotes: 0

Views: 232

Answers (1)

Nghia Do
Nghia Do

Reputation: 2668

There are 2 options here I would think

And to easy, I name Stack A and Stack B which B depends on an exported resource from stack A

  1. If you are using a pipeline for deployment such as Jenkins or AWS Code Pipeline, you can have a step in the pipeline to update stack B after stack A.

  2. If not, configure SNS notification for stack A, so SNS can capture stack A events and then from SNS you can trigger Lambda to trigger stack B update.

Upvotes: 3

Related Questions