I have a lambda function (lambda-invoker) that invoke another lambda (my-lambda-function). Before making the invoke call, I need to know some information of my-lambda-function, in order to pass these informations in the payload of the invoke function (and then find them in the request event of my-lambda-function). One of the informations I need to know is the full api gateway endpoint of my-lambda-function, something like:
https://YOUR-REST-API-ID.execute-api.YOUR-REGION.amazonaws.com/STAGE/RESOURCE-PATH
that is, with my function, something like this:
https://YOUR-REST-API-ID.execute-api.YOUR-REGION.amazonaws.com/test/my-lambda-function/info
What interest me is the 'stage/resource-path', so the '/test/my-lambda-function/info' part of the endpoint.
I know the function name of my-lambda-function, so I can get some information of this lambda calling the 'getFunction' api from aws sdk, but not the endpoint. I've searched in the sdk of the api gateway, and with that i can find the resource path, but I have to know the resource id (and I didi not find an sdk api that give me the resource id of my-lambda-function from the function name).
Someone know how to get the resource path of a lambda using aws sdk (for javascript in my case)?
Thanks