0

I am deploying containers on ECS (fargate) with platform versions 1.4.0 (Latest) in the private subnet using GitHub action. I have routed the traffic through the NAT gateway and have the ECS task Execution role with the secret manager's full access policy. When I bind ECS service to only one private subnet then the containers getting deployed over ECS with no error, but once I bind two private subnets for making ECS service more available then the task gets stopped with an error below error.

ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secret from asm: service call has been retried 5 time(s): failed to fetch secret arn:aws:secretsmanager:ap-south-1:27XXXXX...

I have tried every possible solution mentioned here but none is worked for me.

  • One of your subnets has to be configured incorrectly. You need to make sure both subnets have a route to the NAT Gateway. – Mark B Sep 20 '21 at 16:09
  • Or you have a secrets manager vpc endpoint present, but it's in place for only one of your private subnets. – Nick Sep 20 '21 at 20:14

0 Answers0