Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up lambda versions when making a deployment #38

Open
cokert opened this issue Sep 24, 2020 · 0 comments
Open

Clean up lambda versions when making a deployment #38

cokert opened this issue Sep 24, 2020 · 0 comments

Comments

@cokert
Copy link
Contributor

cokert commented Sep 24, 2020

Kenneth and I talked about this earlier on the phone. When making lambda deployments, the old version of the lambda is still kept around. If you're using S3 for lambda storage, this isn't really necessary since your old versions are available there for re-deployment. It can also eventually exhaust the account level code storage limit, which is 75GB by default. It appears that versions of the AWS lambda consume storage that counts towards the account's code storage limit, regardless of whether you're using S3 for storage or uploading a zip directly to the lambda. If that turns out to not be the case, this issue is moot.

We talked about adding a configuration option that would tell udeploy to remove older versions when making a deployment. When talking about it with my team, Ben mentioned that it would also be nice to have a configuration option for the number of versions to keep, 2 or 3 or however many you want to have quickly available in the console.

I want to note too that the lambda API prevents deletions of versions that have an alias pointing to them, so it's safe to attempt to remove all older aliases. IE, if you have an older lambda version with an alias you've created to keep around for testing, the deletion attempt will fail. Whether udeploy silently ignores this error or surfaces in the UI to the user as a warning is up for discussion.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant