跳至內容

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 ?

已提問 2 年前檢視次數 1191 次

1 個回答
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

已回答 2 年前

專家

已審閱 6 個月前

AWS
支援工程師

已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。