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

2 分的閱讀內容
0

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

The resolution for this error applies to pulling images from an Amazon Elastic Container Registry (Amazon ECR) repository.

If you didn't receive the preceding error message, choose a resolution based on one of the following issues or errors:

Note: To troubleshoot Amazon ECS service issues, check for diagnostic information in the service event log.

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.


AWS 官方
AWS 官方已更新 2 年前