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

**URL:** <https://discourse.sst.dev/t/how-to-set-up-aws-lambda-to-use-same-endpoint-for-different-stages/1095>\
**Category:** Chapter Comments\
**Created:** [June 23, 2019, 5:35am UTC](https://discourse.sst.dev/t/how-to-set-up-aws-lambda-to-use-same-endpoint-for-different-stages/1095 "2019-06-23T05:35:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![balavec](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/balavec/32/510_2.png) [@balavec](https://discourse.sst.dev/u/balavec)\
**Post date:** [June 23, 2019, 5:35am UTC](https://discourse.sst.dev/t/how-to-set-up-aws-lambda-to-use-same-endpoint-for-different-stages/1095/1 "2019-06-23T05:35:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [June 30, 2019, 2:21pm UTC](https://discourse.sst.dev/t/how-to-set-up-aws-lambda-to-use-same-endpoint-for-different-stages/1095/2 "2019-06-30T14:21:54Z")

</div>

I’m actually not sure how to do this without googling for it. In the guide, all the prod vs dev endpoints are different because that’s how Serverless Framework does stages. It just creates two separate API Gateway projects.
