Zet - How do I get the body from an apigateway call using the $input template vtl syntax?
How do I get the body from an apigateway call using the $input template vtl syntax?
You can use $input.json('$') just remember to wrap it in $util.escapeJavaScript to catch any bad escapes.
{
"name" : "$input.params('name')",
"body" : $util.escapeJavaScript($input.json('$'))
}
#aws #aws-gateway