I am trying to send some parameters to an AWS Lambda function from API Gateway, the problem is that Gateway sends all the empty parameters to the lambda, so it fails. I have reviewed the configurations that I know, which are not many, but I have not been able to solve it.
this is my request body:
{
"functionName": "register",
"name": "camilo",
"nick": "kmilo",
"email": "uncorreo@email.com",
"phone": "555555",
"birthdate": "29-09",
"password": "000000"
}
and the mapping template:
{
"functionName":"$input.params('functionName')",
"name":"$input.params('name')",
"nick": "$input.params('nick')",
"email": "$input.params('email')",
"phone": "$input.params('phone')",
"birthdate": "$input.params('birthdate')",
"password": "$input.params('password')"
}
The lambda function works correctly when I test them directly, so I assume the problem is in API Gateway