79685242

Date: 2025-06-30 20:13:34
Score: 1
Natty:
Report link

Yes, that is correct. You can play with test rules in AWS ECR console without deleting anything ("Edit Test rules" button under Lifecycle policy. You'll quickly confirm that rules are only evaluated in order of priority and the first match will expire the image.

The only workaround would be disabling AWS Lifecycle policy, writing your own "cleanup service" that will call ECR API and evaluate each repo with custom logic. I haven't found anything off the shelf that does something like this unfortunately. That's how I came across this post :)

I'm probably gonna write my own implementation of this in the future. If I do, I'll probably publish to code and reply back.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Zarko