While searching for a solution to my problem I stumbled upon " Stages in Serverless Framework" chapter in “Extra Credit > Backend”.
I want to create a lambda and use single endpoint and only the path prefix changing for stages. I think this was possible a while ago without any setting … but now it doesn’t work. I always get different endpoints:
https://abc123.execute-api.us-east-1.amazonaws.com/dev/first-endpoint
https://xyz987.execute-api.us-east-1.amazonaws.com/prod/first-endpoint
But I would like to have:
https://abc123.execute-api.us-east-1.amazonaws.com/dev/first-endpoint
https://abc123.execute-api.us-east-1.amazonaws.com/prod/first-endpoint
My yml file looks like:
service: lambda-helloworld
provider:
name: aws
runtime: nodejs10.x
functions:
hello:
handler: handler.hello
events:
- http:
path: first-endpoint
method: GET
I need help setting this up. Would love your suggestions.