[英]AWS Lambda calling API gateway getting 500 internal server error
I'm developing several AWS serverless applications using Lambda and API gateway.我正在使用 Lambda 和 API 网关开发几个 AWS 无服务器应用程序。
At one point, I tried to execute an API request on one application (using requests python lib) from code running inside a Lambda function in another application.有一次,我尝试在另一个应用程序的 Lambda ZC1C4245268E68A94F1 中运行的代码对一个应用程序(使用请求 python 库)执行 API 请求。 I get 500 server error.我收到 500 服务器错误。 From the logs it appears that the Lambda function behind the API gateway is not starting at all.从日志来看,API 网关后面的 Lambda function 似乎根本没有启动。 I don't find any logs that can tell me what happened.我找不到任何可以告诉我发生了什么的日志。
Additional details:额外细节:
The issue was that the calling lambda needed permission to execute the second lambda behind the API gateway.问题是调用 lambda 需要权限才能在 API 网关后面执行第二个 lambda。 I don't know why that is.我不知道为什么会这样。 I also still don't know how I should have debugged this - where are the logs that should tell me what was the issue.我仍然不知道我应该如何调试它 - 应该告诉我问题所在的日志在哪里。 Eventually it was a lucky guess on my side.最终,这是我的幸运猜测。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.