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 Answers
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
answered 3 months ago
profile picture
EXPERT
reviewed a month ago
0

Yes it shows True for lambda proxy integration

Enter image description here

Tim
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions