'AWS ECS CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref, not found

when trying to run an AWS ECS task I am getting the following error:

CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref "id.dkr.ecr.us-east-1.amazonaws.com/thing/1234567:latest": id.dkr.ecr.us-east-1.amazonaws.com/thing/1234567:latest: not found

In the task definition the image is set as id.dkr.ecr.us-east-1.amazonaws.com/thing/1234567 and is present in the ECR repository. I am not sure where the :latest is coming from, and I am wanting to point it the the image id.dkr.ecr.us-east-1.amazonaws.com/thing/1234567 as opposed to id.dkr.ecr.us-east-1.amazonaws.com/thing/1234567:latest.

I'm wondering if this is just a result of me not knowing how tags work. Can someone point me in the direction of where this :latest is coming from, and how to remove it to point to the image without the :latest that is present in the respository? Thanks very much in advance.



Solution 1:[1]

Ooof. This was just me not understanding the url structure. Should have been pointing to the image thing:1234567 in the task definition as opposed to thing/1234567.

Solution 2:[2]

Another stupid error: make sure the image and its tag you are pulling exist in ecr.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Saus
Solution 2 DaveR