New stage deployment removes the previous stage alias

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?

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}