How do I resolve the "Image does not exist" error when my tasks fail to start in my Amazon ECS cluster?

Last updated: 2019-07-26

My Amazon Elastic Container Service (Amazon ECS) service fails to start tasks in my Amazon ECS cluster. Then, I receive an error similar to the following: "CannotPullContainerError: Error response from daemon: manifest for 1234567890.dkr.ecr.us-east-1.amazonaws.com/test:curlnginx1234 not found." How can I resolve this error?

Short Description

Resolution

1.    Verify that the image is declared in your Amazon ECS task definition.

2.    Verify that the Docker image exists in the Amazon ECR repository.

Note: To view repository information, you can use the Amazon ECR console or run the following commands:

To confirm that an image exists in an ECR repository, run the following list-images command:

aws ecr list-images --repository-name "hello-world"  --region us-east-1

To filter for images in an ECR repository, run the following describe-images command:

aws ecr describe-images --repository-name "hello-world" --region us-east-1 --query 'sort_by(imageDetails,& imagePushedAt)[*]'

Note: Be sure to update your commands with the name of your ECR repository and AWS Region.

3.    Use the full URI for the image when you specify an Amazon ECR image in your task definition.

Important: Verify that there are no leading or trailing character spaces in the URI for the image.


Did this article help you?

Anything we could improve?


Need more help?