- Newest
- Most votes
- Most comments
The issue seems to be because of this - "The ECS tasks try to resolve the rds by name, and it resolves to the RDS public IP (RDS has public and private IPs)"
Refer below section in link
To ensure that queries from the peer VPC resolve to private IP addresses in your local VPC, choose the option to enable DNS resolution for queries from the peer VPC. This option is Requester DNS resolution or Accepter DNS resolution, depending on whether the VPC is the requester or accepter VPC.
Refer below section in link
You can resolve the public domain name to the private IP address of the EC2 instance. To do this, turn on one of the following options on the VPC peering connection:
- Requester DNS resolution -or-
- Accepter DNS resolution
After turning on DNS resolution, you can resolve the public DNS to the private IP address of the instance
Relevant content
- asked 3 months ago
- asked 6 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 years ago
Thanks for that! That solved the issue.
Hi, If the Answer was helpful, please click 'Mark as answered', this can be beneficial to other community members.