7

I would like to set up an AWS ECR lifecycle policy such that an image is expired iff it is older than 90 days and there are at least 10 more recent images. In other words, I want to keep all images that are newer than 90 days, and I want to keep at least the newest 10 images regardless of how old they are.

If I am reading the documentation correctly, this is not possible:

An image is expired by exactly one or zero rules.

and a single rule cannot specify both sinceImagePushed and imageCountMoreThan.

Is this correct? Is there any workaround?

John Velonis
  • 1,449
  • 1
  • 15
  • 13

0 Answers0