How to set up aws lambda to use same endpoint for different stages

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:

But I would like to have:

Would love your suggestions.

My yml file looks like:

service: lambda-helloworld
  name: aws
  runtime: nodejs10.x
    handler: handler.hello
      - http:
          path: first-endpoint
          method: GET

Hi balavec and welcome the Serverless community.

There is definitely a way to get the same URL endpoints. You just need to add some additional configuration. It is in fact documented on our site here:

Hope that helps