amazon-web-services - 来自 Step Function 的跨账户 Lambda 调用
问题描述
我在帐户 A 中有 Step Function,它在帐户 B 中有 lambda。但是在运行 step 函数时,它给出:
An error occurred while executing the state 'lambdaB' (entered at the event id #2). The resource belongs to a different account from the running execution.
有什么办法可以进行这种配置。
解决方案
AWS Step Functions 不能(直接)调用不同账户中的 AWS Lambda 函数。
一种解决方法是调用调用AssumeRole()
账户 B 中的 IAM 角色的 Lambda 函数,然后使用返回的凭证调用账户 B 中的 Lambda 函数。
或者,使用账户 B 中的 API Gateway 以允许从外部源触发 Lambda 函数。
推荐阅读
- tensorflow - 用于部署的 CNN 模型:如何优化
- c# - 有没有办法使用不同名称的控制器和视图但仍然能够显示错误属性消息?
- javascript - 如何交叉过滤 2 dc.js SeriesChart?
- scala - Akka Stream - 带分区的并行处理
- hapi-fhir - StructureDefinition 发布请求返回 404 错误
- shell - shell 中的 sed 函数应用于目录中的所有 .gff 文件
- bigcommerce - 在 Bigcommerce 的任何页面上提取博客数据
- java - Java 重新调整了嵌套列表的元素类型
- mysql - 从 2 个表中选择加入,其中一个表具有来自另一个表的键的数组值
- python - 将数据直接从 BigQuery 加载到 Orange