How to deploy a specific stage in Serverless
Set the stage in your serverless.yml or using the --stage or -s option when calling sls deploy in Terminal. i.e. sls deploy -s dev or sls deploy -s uat.
According to the Serverless documentation, you can either set the stage in your serverless.yml or set it as an option when deploying from terminal.
How to set the stage in Serverless.yml
To set the stage in your serverless.yml, add a stage parameter within your provider as shown in the sample code below and deploy your service.
How to set the stage when deploying
To set the stage when deploying, change STAGE with your chosen stage (i.e. dev, uat or prod) in either of the sample code below
sls deploy --stage STAGE
Or
sls deploy -s STAGE
Any Questions?
We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.