My Amazon Elastic Container Service (Amazon ECS) service fails to start tasks in my cluster, and I receive the following error: "CannotPullContainerError: Error response from daemon: manifest for 1234567890.dkr.ecr.us-east-1.amazonaws.com/test:curlnginx1234 not found."
Short description
You receive this error when you pull images from an Amazon Elastic Container Registry (Amazon ECR) private repository.
If you didn't receive this error message, then choose one of the following resolutions for your issue or error message:
Note: To troubleshoot Amazon ECS service issues, check for diagnostic information in the service event log.
Resolution
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.
To resolve the Image does not exist error, complete the following steps:
- Verify that the image is declared in your Amazon ECS task definition. For more information, see Image.
- Verify that the Docker image exists in the Amazon ECR repository. For more information, see Viewing image details in Amazon ECR. To view repository information, use the Amazon ECR console. Or, run the following commands.
To confirm that an image exists in an ECR repository, run the 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 describe-images command:
aws ecr describe-images --repository-name "hello-world" --region us-east-1 --query 'sort_by(imageDetails,& imagePushedAt)[*]'
Note: Replace repository-name and region with your values.
- Specify an Amazon ECR image in your task definition. Use the full URI for the image. For more information, see Amazon ECR image and task definition IAM role.
Important: Verify that there are no leading or trailing character spaces in the URI for the image.
Related information
Private images in Amazon ECR