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,520 points
716 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
• 58,090 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

Why I saw in the aws s3 glacier vault the size does not match with asw s3 glacier client

Hi, I am not sure, but the client ...READ MORE

answered Jun 29, 2020 in AWS by MD
• 95,440 points
800 views
0 votes
1 answer

AWS DynamoDB Queries Not Showing user data unless with Admin privileges

Replace ownerfield "username" with "id"   type user @model @auth ...READ MORE

answered Feb 23, 2022 in AWS by Korak
• 5,820 points
326 views
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
• 58,090 points
3,837 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP