How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway

for instance if we want to use

GET /user?name=bob

or

GET /user/bob

How would you pass both of these examples as a parameter to the Lambda function?

I saw something about setting a “mapped from” in the documentation, but I can’t find that setting in the API Gateway console.

  • method.request.path.parameter-name for a path parameter named parameter-name as defined in the Method Request page.
  • method.request.querystring.parameter-name for a query string parameter named parameter-name as defined in the Method Request page.

I don’t see either of these options even though I defined a query string.

22 Answers
22

Leave a Comment