ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve ecr registry auth: service call has been retried 3 time(s): RequestError:

0

I am facing this issue while deploying a service on AWS Fargate, and I would greatly appreciate some guidance from the community. I have tried the solutions on StackOverflow on how to resolve it from assigning a public IP address to my task and setting the inbound and outbound rules of my security group. I have tried 80% of the answers no solutions yet.

To provide context, here's an overview of my AWS architecture:

I have a VPC with three public subnets and two private subnets. The service I'm trying to deploy (let's call it the "email service") is intended to run in one of the public subnets. The VPC is connected to the internet via an internet gateway. I've configured security group rules both for inbound and outbound traffic to allow necessary protocols like TCP, HTTP, HTTPS, and SMTP with their respective ports and destinations. I've ensured that my IAM role is correctly configured with the appropriate permissions. Despite these efforts, I'm encountering this error when trying to deploy the service. I've also seen suggestions from other users on Stackoverflow, such as assigning a public IP to the task and setting outbound rules in the security group, but these solutions haven't resolved the issue for me.

Additional information:

The Fargate platform version I'm using is 1.4.0

asked 8 months ago968 views
1 Answer
0

Hello.

Try setting the security group's outbound rule to allow all traffic.
Also, am I correct in my understanding that Fargate tasks are launched in a public subnet?
If you are not running in a public subnet, you will need to set up a NAT Gateway or VPC endpoint to access ECR.
https://docs.aws.amazon.com/AmazonECR/latest/userguide/vpc-endpoints.html

profile picture
EXPERT
answered 8 months ago
  • Yes you are correct, it depends on your service/task and what your architecture looks like, in my case since I'm using an Internet gateway(IGW) I shouldn't have a problem, if they were in a private subnet I would have to maybe have a nategateway to allow internet communication. my outbound rules in the security groups are well-defined. here is what it currently looks like. maybe I'm messing it up somewhere here. I have literally tried all solutions I have seen on StackOverflow thus far

    Security group rule ID IP version Type Protocol Port range Destination Description

    – sgr-07901b*8c8eec76 – Custom TCP TCP 122 sg-04be5a*****ee7ca / Auth service security group Allow Redis communication to Auth service

    – sgr-04b78****04d5cb65 IPv4 HTTPS TCP 443 0.0.0.0/0 Allow access to secrets

    – sgr-09b3b16**73bcd IPv4 SMTP TCP 25 162.0.*.230/32 Allow SMTP messages to the Internet

    – sgr-0e4573****4db14c2 IPv4 All traffic All All

  • This is the Full ERROR I'M GETTING. I REALIZE THE FULL ERROR MESSAGE WASN'T POSTED WHEN I CREATED THIS QUESTION..

    ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve ecr registry auth: service call has been retried 3 time(s): RequestError: send request failed caused by: Post "https://api.ecr.us-east-1.amazonaws.com/": dial tcp 44.213.78.216:443: i/o timeout. Please check your task network configuration.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions