简体   繁体   English

无法使用私有 IP 从 ECS 访问 PostgresSQL RDS

[英]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 范围指向对等连接。

I solved the issue, it's a setting in peering connections - Allow Remote VPC DNS Resolution.我解决了这个问题,这是对等连接中的一个设置 - 允许远程 VPC DNS 分辨率。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ECS Fargate - 容器是否可以访问自己的公共IP地址 - ECS Fargate - Can a container access its own Public IP address VPC外的lambda可以使用rds代理访问aurora rds吗? - Can lambda outside of VPC access aurora rds using rds proxy? 使用私有 IP 和无服务器 VPC 访问从 App Engine 到 CloudSQL 的连接问题 - Connectivity issues from App Engine to CloudSQL using Private IP and Serverless VPC Access Datastream 无法使用专用连接连接到具有专用 IP 的 Cloud SQL - Datastream can not connect to Cloud SQL with private IP using private connectivity RDS Mysql 错误 1045 (28000):用户@IP 的访问被拒绝(使用密码:是) - RDS Mysql ERROR 1045 (28000): Access denied for user @IP (using password: YES) 提供从 ECS 任务访问 EFS - Providing access to EFS from ECS task 无法通过公共 ip 访问 EC2 实例上的站点 - Can't access site on EC2 instance via public ip EKS 中的节点不解析 RDS 的 DNS 名称(IP 工作) - Node in EKS doesn't resolve DNS names of RDS (IP working) AWS:无法从我的机器连接到 RDS 数据库 - AWS: can't connect to RDS database from my machine 使用私有 IP 连接到 Postgres - Connecting to Postgres using private IP
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM