0

I am calling a lambda function from my API Gateway with Lambda proxy integration enabled. But when I am receive the event object in the function it is an empty object i.e. '{}'. I have tested the function with a test input available on AWS Console with dummy request object and it works fine. I am using AWS Cognito Pool as authorizer for the API Gateway Method. In the function I have made an object that returns me dummy data and event object itself. When I hit the API from Postman or my frontend application it returns me with the dummy data and the event object is empty.

I have looked at the following Stackoverflow questions but to no avail.

Event Object is empty in AWS Lambda nodejs function

Passing event from API gateway to Lambda

Event object is empty in api gateway call to lambda

Api Gateway sends empty parameters to AWS lambda

Lambda event returns empty object

This is a small thing and is really hindering my progress. Would really appreciate any help.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Safeer Raees
  • 400
  • 2
  • 11
  • 1
    1, How do you know the object is empty (show the code where you verify this just in case there's some bug in it). 2. Show more about the API Gateway setup. – 404 Jan 27 '21 at 12:52

1 Answers1

0

Just made whole another Lambda and API Gateway setup and it worked. Must have been bad API Gateway configuration

Safeer Raees
  • 400
  • 2
  • 11