agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
229 stars 54 forks source link

feature: add option to specify number of layer versions to keep #113

Closed yezarela closed 7 months ago

yezarela commented 2 years ago

Hi, would like to have this feature so users can specify number of layer versions to keep.

This feature is needed to avoid old layer versions to take up much storage which was limited by AWS. As stated in AWS documentation here https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html , there is hard limit of 75GB of uploaded functions + layers storage.

Would like to hear your feedback, Thank you!

Example result:

image
agutoli commented 2 years ago

Hi @yezarela thank you so much for this PR. It is very welcome. Unfortunately, I'm very busy and rarely have time to work on this project. Thanks again.

So, there's an open issue about this: https://github.com/agutoli/serverless-layers/issues/47

It would be awesome if we could change the option's name from keepVersion to retainVersions, which is more similar to the native support.

yezarela commented 2 years ago

@agutoli thanks for responding! sure, i've updated it to use retainVersions. please kindly check, thanks

brunocasado commented 2 years ago

would be nice have this feature :)

agutoli commented 7 months ago

This feature was already merged.