Skip to content

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

Merged
mergify[bot] merged 5 commits intomainfrom
simpler-cleanup
Nov 30, 2023
Merged

chore: Let AWS Image Builder and ECR deal with deleting old images for us#476
mergify[bot] merged 5 commits intomainfrom
simpler-cleanup

Conversation

@kichik
Copy link
Copy Markdown
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
@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