Skip to content
Advertisement

Extracting Parameters from POST Request in Python Lambda

Context: I’m trying to make a POST request to a AWS lambda function written in python from JavaScript. I will then enter the information in the POST request into a Database.

Problem: I can’t seem to figure out how to get the information out of the POST request. and store it into variables.

I’ve tried to use the event[‘Username’] which in the testing simulation provided by AWS works although in practice doesn’t.

JavaScript
JavaScript
JavaScript

Advertisement

Answer

SOLVED:

I found that posting directly to the AWS Lambda wasn’t working because of the string format. The AWS Lambda requires JSON format with use of JSON.stringify().

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement