首页 > 解决方案 > 允许一个区域中的 cloudformation 访问不同区域中的 lambda 支持的自定义资源

问题描述

我在 us-east-2 中有一个 lambda 支持的自定义资源。当我在 us-east-2 中运行 cloudformation 模板时,它工作得很好。当我去 us-east-1 并尝试相同的 cloudformation 模板时,我收到一个错误:

Function not found: arn:aws:lambda:us-east-1:account-id:function:func_name (Service: AWSLambda; Status Code: 404; Error Code: ResourceNotFoundException;

两个 VPC 之间存在 VPC 对等互连,但这似乎没有任何区别。而当我尝试在不同区域的同一个账户中部署相同的功能时,我得到一个错误,我需要找到一个解决方案。

标签: aws-lambdaaws-cloudformation-custom-resource

解决方案


看起来现在可以使用新的 AWS 堆栈集。

堆栈集允许您使用单个 AWS CloudFormation 模板在跨区域的 AWS 账户中创建堆栈。每个堆栈中包含的所有资源均由堆栈集的 AWS CloudFormation 模板定义

参考: https ://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html


推荐阅读