I'm executing the ECS task within the private subnets alongside the NAT gateway, but I'm encountering an error when attempting to retrieve values from the Secret Manager

0

I'm executing the ECS task within the private subnets alongside the NAT gateway. However, I encountered a 'Secret Manager retrieve value failed' error after creating the endpoint from ECS to Secret Manager, which resolved the issue. Surprisingly, when opting for the public subnet, the role alone suffices. My query pertains to why the ECS in the private subnet requires an endpoint connection to Secret Manager.

1개 답변
0

It sounds like your Private subnet does not have a route to a NAT Gateway in a public Subnet.

profile picture
전문가
답변함 한 달 전
  • The private subnets also have a nat gateway

  • What Subnet is the Nat Gateway on?

  • Yes, If i using the custom policy in the ecs task-definition I getting the "ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secret from asm: service call has been retried 1 time(s): failed to fetch secret arn:aws:secretsmanager:us-east-2:117416794335:secret:SubscriptionApp/Stage/ENV-Credentials-3sS4z9 from secrets manager: AccessDeniedException: User: arn:aws:sts::117234594535:assumed-role/ecsTaskExecutionRole/0fdf743dd51140d2ac90866333e52bdc is not authorized to perform: secretsmanager:GetSecretValue on resource: arn:aws:secretsmanager:us-east-2:117416794335:secret:SubscriptionApp/1/env-Credentials-3sS4z9 because no identity-based policy allows the secretsmanager:GetSecretValue action status code: 400, request id: 1146aef6-1521-47a7-9644-0faabba028b1"

  • Thanks for your error message.. Looks like a Policy issue then?

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

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

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

관련 콘텐츠