API Gateway doesn't pass query parameters on to Lambda function when the resource is +proxy/

0

Please see all the details with the awslabs team on github

I have a lambda function that is only ever receiving the first query parameter from API Gateway. Its been confirmed that the rust's runtime is parsing and handling the data from the json payload it it reaches. However, its not getting there. I suspect it has to do which how the resources are set up in API Gateway.

I currently have the two resources / and /{+proxy} are set up in the account. Both pass on data to the lambda:

Is this a bug or a problem with how proxies pass the data onto the lambda functions?

Tim
已提问 3 个月前322 查看次数
2 回答
0

Hi,
Does you select the "Lambda proxy integration" in API Gateway "Integration request"?
In Lambda proxy integration, API Gateway maps the entire client request to the input event parameter of the backend Lambda function[1] .

If you don't set the "Lambda proxy integration"[2], the API gateway will use custom integrations and you need to set the "mapping template"[3].
The "mapping template" will determine which parameter could send to the lambda.

[1] https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
[2]https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-custom-integrations.html
[3]https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html

profile picture
已回答 3 个月前
profile picture
专家
已审核 1 个月前
0

Yes it shows True for lambda proxy integration

Enter image description here

Tim
已回答 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容