Allow setting a number of revisions to retain on Lambda Layers
#7.344 geöffnet am 16.02.2020
Repository-Metriken
- Stars
- (46.915 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 15h) (34 gemergte PRs in 30 T)
Beschreibung
Feature Proposal
Allow a configuration option on layers that specifies the number of layers to retain during deployments.
Description
Currently there is only one option for managing layers with Lambda, retain or delete (documented here https://serverless.com/framework/docs/providers/aws/guide/layers/). However, there are cases where you may wish to keep X number of revisions before deleting them (canary deployments, rolling releases, and etc).
Example configuration:
layers:
vendor:
path: layers
name: some-layer-name
description: "describe the layers use case"
retain: true
versions: 10
We could set the option to retain to be true and manually delete the layers after x amount of time with a custom script, but this option would be more practical and elegant.