In this question How to pass a querystring or route parameter to AWS Lambda from Amazon API Gateway
it shows how to map query string params to AWS lambda using API gateway. But, i want to pass a querystring inside a variable to lambda
For example: /api/index&sample=index.php <--- I want this to store in 'url'
www.sample.com/prod?url=/api/index&sample=index.php <--- Like this
but 'url' only returns /api/index
sample=index.php is treated as another variable.
I used application/json on mapping templates
{
"url": "$input.params('url')"
}
How do you do this. Please help thanks in advance