Reputation: 2626
I am working with AWS API Gateway and Lambda, I am trying to passe a valid Json object to the Lambda function to avoid sanitizing the data in the function. Using this code:
"params" : "$input.params()",
will result in this data being sent to the Lambda function:
"params" : "{path={}, querystring={src_build=rfsdfsdf}, header={}}",
Is there a solution get the $input.params as a valide json dictionary ?
Upvotes: 5
Views: 2367
Reputation: 7122
The answer may be just $input.json('$')
.
I based this answer on information from API Gateway Developer Guide.
Upvotes: 2