spinnaker-plugins / aws-lambda-deployment-plugin-spinnaker

Spinnaker plugin to support deployment of AWS Lambda functions via Spinnaker pipelines
Apache License 2.0
23 stars 22 forks source link

Feature Request: Add an option for the Lambda Deploy stage to only keep N versions #103

Open dkirillov opened 3 years ago

dkirillov commented 3 years ago

As a user of the Lambda plugin, I would like the Lambda Deploy stage to keep only a certain amount of Lambda versions when deploying.

The functionality should mimic that of EC2 and ECS deployments, where you can specify the amount of server groups to keep.

It has been observed in our environment that the number of versions kept impacts the performance of the Lambda Deploy stage - the more versions, the slower the Lambda Deploy stage is. (Guessing due to cache and iteration over versions).

Currently the Lambda Deploy stage provides no option of specifying the amount of versions to keep. If the Lambda Deploy stage is has version publishing enabled, it will forever keep creating new versions without cleaning up the old ones.

I expect the Lambda Deploy stage to have an option to keep N of the latest versions and delete the rest. Much like the EC2/ECS deploy stages do with server groups - see screenshot:

ec2-deploy