Fargate task stuck on Pending state

0

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?

1개 답변
0

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:

  • AmazonEC2ContainerRegistryReadOnly
  • AmazonS3ReadOnlyAccess It is recommended to customize the policies it and use specific resource of the relevant registry.
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠