How to deploy a specific stage in Serverless

Oscar de la Hera Gomez
Three flowers that represent AWS Lambda, Typescript & Serverless side by side. Beneath it sits the text "Deploy Stage."

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.

delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details