[英]Can't access PostgresSQL RDS from ECS using private IP
I have a postgres RDS on AWS on Su.net A, VPC 1. I have an ECS service with ASWVPC.networking behind a load balancer on su.nets A, B, C, VPC 2. Both VPCs are peered.我在 Su.net A、VPC 1 上的 AWS 上有一个 postgres RDS。我在 su.net A、B、C、VPC 2 上的负载均衡器后面有一个带有 ASWVPC.networking 的 ECS 服务。两个 VPC 都是对等的。 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.我似乎无法使用其私有 IP 连接到 RDS。我的 ECS 容器总是尝试访问其公共 IP 上的数据库,这很麻烦,因为我想阻止对 RDS 的公共访问。 Reachability Analyzer on RDS + Container Elastic Network Interfaces shows that the database is reachable from the container using private IP. Please help! RDS + 容器弹性网络接口上的可达性分析器显示可以使用私有 IP 从容器访问数据库。请帮忙!
Edit: The route table for my ECS service is correct - it points the RDS IP range to the peering connection.编辑:我的 ECS 服务的路由表是正确的——它将 RDS IP 范围指向对等连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.