Cloud Formation cross-region stack reference

0

Hi,

We are using cloud formation templates to deploy resources in our primary region us-east-1. Some of the stacks need to import resources from our secondary region us-east-2 cloud formation stacks.

Is it possible to do that ?

asked 3 months ago173 views
1 Answer
0

I apologize, but it is not possible to directly import resources from CloudFormation stacks across different AWS regions. CloudFormation does not support cross-region resource imports or cross-region stack references.

CloudFormation resource imports and cross-stack references are limited to resources within the same AWS account and region as the target stack. This means that you cannot directly reference or import resources from your secondary region (us-east-2) into stacks in your primary region (us-east-1).

To work around this limitation, you may need to consider alternative approaches:

  1. Replicate the necessary resources in both regions independently.

  2. Use a centralized configuration management system to store and share information between regions.

  3. Implement custom solutions, such as using AWS Lambda functions or other AWS services, to retrieve and pass information between regions as needed.

  4. Consider using AWS Systems Manager Parameter Store or AWS Secrets Manager to store and retrieve cross-region configuration values.

While these workarounds can help manage resources across regions, they do not provide direct cross-region stack references or imports within CloudFormation itself. Each region's resources would need to be managed separately in their respective CloudFormation stacks.
Sources
Import existing resources into a CloudFormation stack | AWS re:Post
Refer to resource outputs in another CloudFormation stack - AWS CloudFormation

profile picture
answered 3 months ago
AWS
SUPPORT ENGINEER
reviewed 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions