【发布时间】:2023-04-03 04:08:02
【问题描述】:
我正在尝试按照这篇出色的帖子来部署基于 Java 的 AWS lambda 应用程序。我正在按照该帖子中的说明编写脚本。调用 aws apigateway put-integration 时收到以下错误:
调用时发生错误 (BadRequestException) PutIntegration 操作:Lambda 函数 ARN 必须在同一个账户中
我正在尝试编写一个 API 网关到 lambda 函数的创建脚本。这是完整的 deploy.sh 脚本。我的本地机器上有必要的 AWS_ACCESS_KEY_ID、AWS_SECRET_ACCESS_KEY 和 AWS_ACCOUNT_ID 环境变量。
我不知道该错误告诉我什么。 AFAIK,访问密钥以及 id 和帐户 ID 都来自同一个 IAM 用户。
我的 AWS CLI 脚本
aws apigateway put-integration --region ap-south-1 --rest-api-id xxttj6inea --resource-id bgncc0 --http-method GET --type AWS --integration-http-method POST --uri arn:aws:apigateway:ap-south-1:lambda:path/2019-09-20/functions/arn:arn:aws:lambda:ap-south-1:***********:function:Hello/invocations
非常感谢您的任何想法/帮助。
【问题讨论】:
-
为什么你在这里重复了 josh long 的问题,你不能写你自己的问题吗? stackoverflow.com/questions/48109998/…
-
我投票结束这个问题,因为它是this post的复制/粘贴
标签: amazon-web-services aws-lambda command-line-interface aws-sdk