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

chore: Let AWS Image Builder and ECR deal with deleting old images for us #476

Merged
merged 5 commits into from
Nov 30, 2023

Conversation

kichik
Copy link
Member

@kichik kichik commented Nov 26, 2023

AWS Image Builder recently introduced lifecycle rules that can help us remove old images from EC2/ECR, and their descriptors on AWS Image Builder side.

CDK added automatic deletion of images in repositories so they can be deleted in CloudFormation easily. We had a custom resource to delete images, but now we can just use autoDeleteImages.

We still have to clean-up AWS Image Builder image descriptors and AMIs with a custom resource. We do this so removing our construct won't leave anything behind.

Resolves #471

BREAKING CHANGE: CDK 2.110.0 and above is required

@kichik kichik marked this pull request as ready for review November 30, 2023 14:39
@mergify mergify bot merged commit 27447ea into main Nov 30, 2023
16 checks passed
@mergify mergify bot deleted the simpler-cleanup branch November 30, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic life cycle management for AMIs
2 participants