AWS Redshift 到本地计算机的连接错误

Connection error of AWS Redshift to local computer

我尝试使用 pycopg2 将 Amazon Redshift 连接到我的本地计算机。但是,我收到一条错误消息:

psycopg2.OperationalError: could not connect to server: Operation timed out. Is the server running on host xxx and accepting TCP/IP connecitons on posrt 5439

我已经完成了两个搜索指南 google:

  1. 将公开访问设置更改为启用,并且
  2. 0.0.0.0/0 和 ::/0 添加到 VPC 路由作为网关。

还是不行。如果您知道问题出在哪里,请告诉我。

要检查的事项:

  • 检查与 Redshift 集群关联的安全组,并确认它允许从您的 IP 地址访问端口 5439
  • 检查 Redshift 集群是否在 Public 子网中启动(路由 Table 该子网 指向 0.0.0.0/0互联网网关)
  • 确保您使用 DNS 名称进行连接(如果您 ping DNS 名称,它是否解析为 IP 地址?)
  • 尝试通过不同的网络(例如,在家里、办公室还是通过 phone 连接)?