Hello everyone,
I am prettty new with AWS cloud and I am struggling on a silly problem.
I have a simple HTML form that send data as “content-type: application/x-www-form-urlencoded” to API GW. When I tried to read the data from Lambda event, I got this in request body: email=test%40test.com and I am not able to convert in JSON.
Is there a way to convert it to JSON through API GW?
I tried using mapping templates, but I am bit lost.
This is the important part of my serverless.yml:
Blockquote
functions:
subscribe:
handler: bin/register
memorySize: 128
events:
- httpApi:
path: /register
method: post
integration: lambda
request:
passThrough: NEVER
template:
application/x-www-form-urlencoded: $input.json(‘$’)
Where I am doing wrong?