rollback
Rollback a service to a specific deployment.
serverless rollback --timestamp timestamp
If timestamp
is not specified, Framework will show your existing deployments.
Options
--timestamp
or-t
The deployment you want to rollback to.--verbose
Shows any Stack Output.
Provided lifecycle events
rollback:initialize
rollback:rollback
Examples
AWS
At first you want to run serverless deploy list
to show your existing deployments. This will provide you with a list of the deployments stored in your S3 bucket. You can then use the timestamp of one of these deployments to set your infrastructure stack to this specific deployment.
Example:
$ serverless deploy listServerless: Listing deployments:Serverless: -------------Serverless: Timestamp: 1476790110568Serverless: Datetime: 2016-10-18T11:28:30.568ZServerless: Files:Serverless: - compiled-cloudformation-template.jsonServerless: - mail-service.zipServerless: -------------Serverless: Timestamp: 1476889476243Serverless: Datetime: 2016-10-19T15:04:36.243ZServerless: Files:Serverless: - compiled-cloudformation-template.jsonServerless: - mail-service.zipServerless: -------------Serverless: Timestamp: 1476893957131Serverless: Datetime: 2016-10-19T16:19:17.131ZServerless: Files:Serverless: - compiled-cloudformation-template.jsonServerless: - mail-service.zipServerless: -------------Serverless: Timestamp: 1476895175540Serverless: Datetime: 2016-10-19T16:39:35.540ZServerless: Files:Serverless: - compiled-cloudformation-template.jsonServerless: - mail-service.zipServerless: -------------Serverless: Timestamp: 1476993293402Serverless: Datetime: 2016-10-20T19:54:53.402ZServerless: Files:Serverless: - compiled-cloudformation-template.jsonServerless: - mail-service.zip
$ serverless rollback -t 1476893957131Serverless: Updating Stack...Serverless: Checking Stack update progress........Serverless: Stack update finished...