# New stage deployment removes the previous stage alias

**URL:** <https://forum.serverless.com/t/new-stage-deployment-removes-the-previous-stage-alias/15374>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [June 23, 2021, 5:54am UTC](https://forum.serverless.com/t/new-stage-deployment-removes-the-previous-stage-alias/15374 "2021-06-23T05:54:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![muqadar-ali](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/muqadar-ali/32/4651_2.png) [@muqadar-ali](https://forum.serverless.com/u/muqadar-ali)\
**Post date:** [June 23, 2021, 5:54am UTC](https://forum.serverless.com/t/new-stage-deployment-removes-the-previous-stage-alias/15374/1 "2021-06-23T05:54:40Z")

</div>

0

I am trying to deploy lambda on multiple stages i.e. dev/sit/uat.

I want version of this lambda on each stage i.e. dev/sit/uat.

When I deploy on dev

> sls deploy -v --stage dev

it creates a new version and attach to alias but when I run

> sls deploy -v --stage sit

, dev stage is no longer visible in lambda console.

Below given is the sample lambda configuration. Anyone has idea how to preserve previous alias and not override?

```auto
functions:
  FirstLambda: # A Function 
    name: myLambda # Deployed Lambda name
    handler: ./src/index.handler # The file and module for this specific function. 
    role: ${env:Lambda_Role} # IAM role which will be used for this function
    timeout: ${env:Lambda_Api_Timeout} #seconds
    memorySize: ${env:Lambda_Api_Memory} # memorySize for this specific function.
    deploymentSettings:
      type: AllAtOnce
      alias: ${opt:stage}
    environment: # Function level environment variables
      APP_NAME: ${env:APP_NAME}
      CONFIG_PROFILE: ${env:CONFIG_PROFILE}

```
