Menu

1 / 6

Expiring Untagged ECR Images Deletes the Digest an ECS Service Still Runs, and New Tasks Fail to Pull

DEV Community: aws·KBY Technologies·17 days ago
#eb3ckQfn
#devtoaws#devto#dev#lifecycle#service
Long article (1665 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on KBY Technologies .

If you run services on ECS and use ECR lifecycle rules to keep a registry tidy, this is the check we would run before your next cleanup-rule change: whether any service is pinned to a digest that has lost its tag. We cover the read-only commands that confirm it and the order for a safe fix.

Symptom

New Amazon ECS tasks stop with CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref , while the tasks that were already running stay healthy. If the Amazon ECR lifecycle rules changed recently, check first for a rule that expires untagged images. The service is pinned to an image digest, that digest lost its tag when the pipeline pushed a newer image under the same tag, and the rule then deleted it. The fix is to deploy a revision that names a unique tag or digest that exists, then rewrite the lifecycle policy so it never selects an image a service can still start.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.