'service task stuck at pending status in aws ecs fargate when pushing docker image from visual studio 2019
I am trying to push Aspnet core project into AWS ECS Fargate from Visual Studio using AWS Tootkit following this AWS tutorial.
The pushing docker image and ECS fargate registeration is successful however the task is at PENDING status.
ECS Cluster: my-cluster:
Any idea please to debug please?
Solution 1:[1]
Click on Task to see more info:
Status reason CannotPullContainerError: Error response from daemon: Get https://xxxx.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Assign Public IP Address to allow Task to pull docker image from outside:
Solution 2:[2]
There are various reasons why it could be stuck in PENDING.
- You may need to assign a public IP to your ECS Service.
- You may have specified a CloudWatch log group in your ECS Task Definition that has not yet been created in CloudWatch.
- If you have configured a Load Balancer in your ECS Service, the Security Group(s) specified in your ECS Service configuration may not have access to the port of the ECS Service in order for the health checks to pass.
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 | beewest |
| Solution 2 | Ashley Kleynhans |




