I have a lambda function which has its api-gateway URL. Also, I have a custom domain URL associated with it in CloudFront (https://abc.def.com/ghi). I can access my lambda using the custom domain. Now as a requirement I am supposed to return the custom domain URL from the lambda function as part of the JSON response. So my response body from the lambda should look like:
{
"response": "hi i am coming from lambda",
"myurl": "https://abc.def.com/ghi"
}
How do I catch hold of the URL inside lambda function? PS: I am using node 8.10 environment.