I have been trying to pass a query string or route parameter to AWS Lambda from Amazon API Gateway.
I mapped the query string params to AWS Lambda using the API Gateway, using POST Values instead of query-string
Like this :
{
"values": "$input.params()"
}
It doesn't seem to be working, does not display any actual form of data.
I am posted it using :
application/x-www-form-urlencoded
I got my response from my lambda function because of it no doubt it is invoking lambda fine but the main problem here is that I don't get see the POST params anywhere. I am not able to figure out how to map them. I dumped and as a return, what I get on Lambda side is here:
{"values":"{path={}, querystring={}, header={Accept=*/*, Accept-Encoding=gzip, deflate, Accept-Language=en-US,en;q=0.8, Cache-Control=no-cache, CloudFront-Forwarded-Proto=https, CloudFront-Is-Desktop-Viewer=true, CloudFront-Is-Mobile-Viewer=false, CloudFront-Is-SmartTV-Viewer=false, CloudFront-Is-Tablet-Viewer=false, CloudFront-Viewer-Country=US, Content-Type=application/x-www-form-urlencoded, Origin=chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop, Postman-Token=7ba28698-8753-fcb1-1f48-66750ce12ade, Via=1.1 6ba5553fa41dafcdc0e74d152f3a7a75.cloudfront.net (CloudFront), X-Amz-Cf-Id=sc8C7dLcW0BHYopztNYrnddC0hXyFdBzHv0O9aWU1gKhd1D_J2HF3w==, X-Forwarded-For=50.196.93.57, 54.239.140.62, X-Forwarded-Port=443, X-Forwarded-Proto=https}}"