1 Answer
- Newest
- Most votes
- Most comments
0
Hi, https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html#lifecycle_policy_example_number gives you proper example:
{
"rulePriority": 1,
"description": "Rule 1",
"selection": {
"tagStatus": "tagged",
"tagPrefixList": ["prod"],
"countType": "imageCountMoreThan",
"countNumber": 1
}
By changing countNumber to 10 and adapting tagPrefixList to your prefix, you should be able to achieve the cleanup that you want
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Hi Didier, thanks for the answer but unfortunately this rule is also deleting the images that are having "dev" as the one of the tags in subset.