I have an AWS Lambda function in Node that is triggered by a request to an API Gateway resource. In the Lambda, I am trying to retrieve the querystring parameters. Once all is set up correctly, I would expect them to be in the "event" object, right?
- In my API Gateway resource, I click on the ANY method and then click Method Request and I provide some URL Query String Parameters
- Then I go back and click on Integration Request. where I see another area called URL Query String Parameters. I provide the same parameter names there.
- Then I go back and click Test. I see that I can provide values for the querystring parameter names that I entered. I provide the values and click Test.
- In the output of my Lambda, I dump out the value of event and see that it is an empty object.
On this page I see some short documentation about requestParameters, but it doesn't tell me what to do with them, or how to access them in the Lambda.
I know that I can set up a Body Mapping Template on the Integration Request page and get it to work that way, but what is the purpose of the URL QueryString Parameters area on the Integration Request screen? Do those get passed to the Lambda? If not, where do they get passed to? What is their purpose? If you have a link to better documentation, please share.
Please don't just link me to this other post. I'm looking for more of an explanation specificically on how to use the URL QueryString Parameters specifically on the Integration Request screen in API Gateway.
Thanks! -- Anthony