AWS Lamda with Proxy Integration not recieving request parameters

0 votes

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

Sep 19, 2018 in AWS by bug_seeker
• 15,350 points
70 views

1 answer to this question.

0 votes

The lambda proxy integration should pass through everything. Can you try doing a console.log(event) to make sure it's not getting messed up in the request somehow

answered Sep 19, 2018 by Priyaj
• 56,900 points

Related Questions In AWS

0 votes
1 answer
+1 vote
2 answers

Starting with an AWS Instance with API and AUTHPARAMS

The API is usually much easier to ...READ MORE

answered Apr 17, 2018 in AWS by Cloud gunner
• 4,280 points
479 views
+2 votes
3 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
10 answers
0 votes
1 answer

Getting ORA-01882: timezone region not found with Oracle UCP, on aws ec2 instance?

You can pass command line argument -Duser.timezone=<Database Time ...READ MORE

answered Oct 3, 2018 in AWS by Priyaj
• 56,900 points
526 views