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.…