#Azure - Rollback

Rollback the Serverless service to a specific deployment.

serverless rollback --timestamp timestamp

#Options

  • --resourceGroup or -g - Specify the resource group name
  • --stage or -s - Specify stage name
  • --region or -r - Specify region name
  • --subscriptionId or -i - Specify subscription ID
  • --timestamp or -t The deployment you want to rollback to.
  • --verbose or -v Shows any Stack Output.

#Provided lifecycle events

  • rollback:rollback

#Examples

#Azure

At first you want to run serverless deploy list to show your existing deployments. This will provide you with a list of the ARM deployments from Azure. You can then use the timestamp of one of these deployments to set your infrastructure stack and app code to this specific deployment.

Example:

$ sls deploy list
Serverless: Listing deployments for resource group 'sls-myapp-rg':
Serverless:

Deployments
-----------
Name: sls-myapp-rg-deployment-t1562970576430
Timestamp: 1562970576430
Datetime: 2019-07-12T22:29:36.430Z

-----------
Name: sls-myapp-rg-deployment-t1562970293429
Timestamp: 1562970293429
Datetime: 2019-07-12T22:24:53.429Z
-----------
$ serverless rollback -t 1562970293429

Have questions?

Head over to the forums to search for your questions and issues or post a new one.