Fargate task stuck on Pending state
Hello, I've ceated an ECS service with private subnet (no internet access) In the Task Definition, the role for image pull is the default predefined ECS rule. In order to allow communication towards ECR, I've created ecr-api endpoint, ecr-dkr enpoint and an s3 endpoint gateway using the very same subnet used in the service. The problem is that the Fargate service tasks are stuck in pending state. If I create a service with the same Task Definition using a public subnet of the default VPC, everything is working well. If I connect an instance to the private subnet I see that the ecr hostname is translated into local address. What am I missing?
My problem was related to IAM.
It appears that when working on a PrivateLink there's a need to attach the following policies to the ecsTaskExecutionRole Role:
It is recommended to customize the policies it and use specific resource of the relevant registry.
Which role do I have to use for the Fargate tasks on AWS Batch?Accepted Answerasked 6 months ago
CodePipeline with ECS Fargate using Graviton2 is failingasked 7 months ago
Unable to run ECS Task using image from ECRasked a year ago
Overriding Hostname on ECS FargateAccepted Answerasked 5 months ago
ECS Fargate Task in EventBridge has ResourceInitializationErrorasked 3 months ago
defining the name of task definition json to run ecs task in github actionsasked 2 years ago
ECS Task Groupsasked 3 years ago
How to register IP address for ECS task at startup so that other resources can find itAccepted Answerasked 2 years ago
Fargate task stuck on Pending stateasked a month ago
ECS: Unable to start task from within a private subnet without enabling public IPasked 23 days ago