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

Update ECR lifecycle policy to cut costs #36

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isobit
Copy link
Contributor

@isobit isobit commented Dec 5, 2024

This retains only 100 images with master/main prefixed tags, 100 of any other tag, and any other images less than 90 days old.

I haven't fully thought through the implications of changing this on every ECR repo we have, but putting up a PR anyway to start a discussion.

For reference, we're spending roughly $670/mo on ECR storage in the remind AWS accounts.

To roll this out, we'll have to cut a new v1.x.y release and then trigger all the CircleCI pipelines that use the orb, and they should all update the lifecycle policy for their ECR repos.

This retains only 100 images with master/main prefixed tags, 100 of any
other tag, and any other images less than 90 days old.
@isobit isobit requested a review from a team December 5, 2024 00:31
@@ -7,7 +7,7 @@
"tagStatus": "tagged",
"tagPrefixList": ["master", "main"],
"countType": "imageCountMoreThan",
"countNumber": 1000
"countNumber": 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like 1k on the main branch is reasonable. I'm not sure, but I'd guess a lot of our cost is coming from the other 5k on feature branches.

@isobit isobit marked this pull request as draft December 5, 2024 00:37
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

Successfully merging this pull request may close these issues.

2 participants