API网关自定义授权者从不调用目标lambda

时间:2018-09-30 04:40:21

标签: amazon-web-services aws-lambda aws-api-gateway

我已按照规范AWS Docs设置了自定义授权者,已启用API网关,设置了授权者,并可以获取cloudwatch日志以显示授权。

每个调用都重定向到我的函数的url上,但是只有在出现“ 400错误请求”时才会失败:

Sending request to https://lambda.$REGION.amazonaws.com/2015-03-31/functions/arn:aws:lambda:$REGION:$AID:function:$LAMBDA/invocations
Received response. Integration latency: 1 ms
Endpoint response body before transformations: <html> <head><title>400 Bad Request</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> </body> </html>
Endpoint response headers: {Server=awselb/2.0, Date=Sun, 30 Sep 2018 04:32:01 GMT, Content-Type=text/html, Content-Length=138, Connection=close}
Lambda invocation failed with status: 400. Lambda request id: N/A

此权限在某处吗? Api网关可以很好地调用我的“登录” API。

如果我使用“ TEST”按钮通过控制台调用目标Lambda,则效果很好。

有什么想法吗?

0 个答案:

没有答案