Search code examples
serverless-frameworkserverlessrollbackaws-serverless

Keep more than five versions of server less package to rollback to?


I am using the serverless framework to deploy a production system on AWS Lambda. I recently learned of the serverless deploy list and serverless rollback --timestamp timestamp commands, which seem very useful in case of emergency.

Is there a way to store/list more than five previous versions? I do not mind using extra storage, so I would prefer to keep many more versions (maybe 100?) available for rollback if possible.


Solution

  • As far as I know serverless blocks the number of versions to 5, from this PR https://github.com/serverless/serverless/pull/4134/files

    Did a quick test and you can backup the builds to other bucket and when you want to rollback you just need to move them again to serverless bucket then if you do list and rollback you can use them again.

    This is actually an interesting case that could be easily done in a serverless plugin.