跳至内容

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 年前1189 查看次数

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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。