I am attempting to pass query string parameters into a lamba function via the API Gateway using the Lamda Proxy Integration.
I have validation turned on API Gateway so I know that the required query param is being accepted by the API Gateway but when I inspect the event object in the Lamda code it is totally empty.
This is my test code in node.js 6.1 from the lamda function
exports.handler = (event, context, callback) => {
payload = {
message:'My message',
event:event
}
var response = {
"statusCode": 200,
"headers": {},
"body": JSON.stringify(payload),
"isBase64Encoded": false
};
callback(null, response);
}
The response looks like this
{
"statusCode": 200,
"headers": {},
"body": "{\"message\":\"My message\",\"event\":{}}",
"isBase64Encoded": false
}
I am expecting only to see the body in the response as per the docs on the Lamda Proxy Integration which makes me think there is an issue in the configuration but I have the box ticked in the Request area of the API