I am deploying code to AWS Lambda / API Gateway.
At the moment, the generated API gateway endpoint contains the stage name in the path. However each stage also has its own API endpoint anyway: e.g. if I deploy the same project to both “dev” and “prod” stages I get e.g.
I therefore don’t see what benefit having the stage in the path is doing, and indeed it’s making life really difficult for me with generating URLs within my app.
Is there any way to keep the stage name out of the API gateway path, and expose the application at ‘/’ instead? Or is this a fundamental limitation of API Gateway?
Aside: I found https://github.com/serverless/serverless/issues/2067 but this is making the opposite request: to use a single shared API gateway instance with /dev, /prod etc mounted on it. I am quite happy to have separate API gateway instances with their own URLs for each stage, I just don’t want the stage name to be inserted into the path.
Any clues gratefully received.