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?

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
전문가
검토됨 한 달 전
0

Yes it shows True for lambda proxy integration

Enter image description here

Tim
답변함 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠