I have a specific issue on my AWS lambda function that I have recently built (in python 3.8). It's supposed to support a post request and put an item from the body of the request into a table in DynamoDB.
My Lambda function looks like this:
When I test using API Gateway it works perfectly and I get what I expect. and the item gets inserted into the table. This is the response on the API-Gateway Test:
Here's my API gateway post method set up:
However, when I use postman and try to post a JSON I get this Key Error: (Note the JSON body of the post is identical).
Any help I get here will be very much appreciated.
Edit: For those who have read the comments below. This is the code I'm using to return the event:
print(json.dumps(event))
to your lambda and check in CW Logs the outcome. – Marcin