I am currently experiencing an issue when trying to launch ECS tasks in a peer (requester) VPC's private subnet. I receive the following error message:
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 from secrets manager: RequestCanceled: request context canceled caused by: context deadline exceeded
According to the VPC Peering documentation at https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html, "You cannot connect to or query the Amazon DNS server in a peer VPC." I suspect that this limitation might be causing my issue, as my EC2 instances in the private subnet are able to reach the internet, but I cannot access AWS services (such as ECR and Lambda) in the peer VPC. Same ECS tasks were launched in the main (accepter) VPC account and they worked without issues.
Can someone help me understand why this limitation exists and how it could be related to my issue? Is there a workaround to resolve this problem? Any guidance or suggestions would be greatly appreciated.
Thank you!