I use the Serverless Framework to deploy functions in AWS Lambda, but I cannot find where / how I can remove the stage qualifier from the generated URL endpoints. The documentation does not seem to cover this part.
For example, this is my serverless.yml (with inappropriate parts):
service: cd-mock provider: name: aws runtime: python3.6 region: eu-west-1 package: include: - handler.py functions: index: handler: handler.index events: - http: path: / method: get
After serverless deploy , the following overhead information is returned:
service: cd-mock stage: dev region: eu-west-1 stack: cd-mock-dev api keys: None endpoints: GET - https://ab1cd2ef3g.execute-api.eu-west-1.amazonaws.com/dev/ functions: index: cd-mock-dev-index
Note the /dev part of the endpoint of the URL, as well as the function. This dev value is the default value for the stage parameter in the configuration file.
The stage: something serverless.yml in serverless.yml will have /something as a suffix in the URL and as part of the function.
Question: how can I remove the stage specification from the generated URL endpoints or: how can I prevent this stage specification from becoming part of the generated URLs?
(The fact that this part is part of the function is fine. It will be easy to separate the staging and production functions on the AWS lambda control panel.)
source share