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 Antworten
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
beantwortet vor 3 Monaten
profile picture
EXPERTE
überprüft vor einem Monat
0

Yes it shows True for lambda proxy integration

Enter image description here

Tim
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen