I get the following error running an AWS batch job:
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 54.239.19.155:443: i/o timeout
I am using Fargate option for the AWS batch compute environment.
My VPC contains a subnet with 'auto assign public IPv4 address', an internet gateway, and a matching route table. I thought that this might be a problem in my VPC, so to verify that, I've launched a new EC2 instance in the VPC, and run in the EC2 instance curl to https://api.ecr.us-east-1.amazonaws.com. The curl can connect without any issues.
What could be the problem?
The VPC setting "auto assign public IPv4 address" only applies to EC2 instances I believe. For Fargate tasks in ECS or Batch you need to enable the assignPublicIp setting.
The best answer is right. "The VPC setting "auto assign public IPv4 address" only applies to EC2 instances I believe. For Fargate tasks in ECS or Batch, you need to enable the assignPublicIp setting."
Albeit please make sure the VPC is correct first before diving into roles, tasks and policy.
To configure VPC for Fargate correctly:
The first video is the one I followed since I didn't want a load balancer. Although, I turned on the auto-generated subtitles as it's in Spanish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With