Reputation: 21
I have a postgres RDS on AWS on Subnet A, VPC 1. I have an ECS service with ASWVPC networking behind a load balancer on subnets A, B, C, VPC 2. Both VPCs are peered. I can't seem to connect to the RDS using its private IP. My ECS containers always try to access the database on its public IP, which is troublesome because I would like to block public access to the RDS. Reachability Analyzer on RDS + Container Elastic Network Interfaces shows that the database is reachable from the container using private IP. Please help!
Edit: The route table for my ECS service is correct - it points the RDS IP range to the peering connection.
Upvotes: 0
Views: 1170
Reputation: 21
I solved the issue, it's a setting in peering connections - Allow Remote VPC DNS Resolution.
Upvotes: 0