0

After referencing the following StackOverflow post: How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway I've reasoned that the only non-proxy way to map and send my request parameters to a lambda function has been to build a mapping template in the integration request section of API gateway.

However, there is an additional dropdown in the API Gateway Integration Request section for 'URL Query String Parameters' that allows for "URL path parts, URL query string parameters, and HTTP headers sent from the client in the Method Request can be mapped by API Gateway to URL query string parameters in the Integration Request" Description of how the URL query string parameter maps information

Image of URL Query String Parameter Dropdown

When I have tried to use this method to passthrough query string parameters, I have no way to access those parameters in my lambda function. The AWS Event body remains empty unless I specifically define a mapping template that passes through the parameters.

My Lambda code is quite simple, it just returns the event object.


def lambda_handler(event, context):
    # echo event object sent
    return {
        'statusCode': 200,
        'body': event
    }

Am I mis-understanding how this dropdown functions? Is there anyway to pass parameters to my lambda function using this method rather the mapping template?

0 Answers0