aws / aws/containers-roadmap

[ECR] [request]: Lifecycle policy for image tags

Open
#1,549 3 comments 7 reactions 0 assignees View on GitHub
ECR Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
ECR has a lifecycle policy for images. Could we have a lifecycle policy for tags as well?

**Which service(s) is this request for?**
ECR

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
We build and tag images with the git commit hash of the image build. We run lots of image builds - if the underlying image doesn't actually change, then the same image gets tagged with multiple tags. If the underlying image doesn't change for a while, then we can accumulate tags on the same image until we reach the maximum - 1,000 tags per image. At that point, the image build pipeline fails.

Most of the tags are unused, and we can identify the ones that are not used. If there was a lifecycle policy for tags, we could use it to reap tags that we don't need, and not have the 1,000-tags-per-image quota break our image build pipeline.

**Are you currently working around this issue?**
We manually delete image tags via AWS CLI.

**Additional context**
none

**Attachments**
none

Contributor guide

Open the contributing guide

Research direction

This is a request for an ECR service capability rather than a repository code change. Start with the stated 1,000-tags-per-image limit and the current manual AWS CLI workaround; done would mean ECR supports a lifecycle policy that reaps unused tags without breaking image builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.