can't connect to redshift database

前端 未结 4 2060
星月不相逢
星月不相逢 2020-12-18 21:30

I\'m trying to connect to Redshift database from SQL Workbench/J using Postgre JDBC drivers but I can\'t get through. I get this error \"The connection attempt failed\". The

相关标签:
4条回答
  • 2020-12-18 22:04

    I was attempting to connect from my local machine via psql to a Redshift cluster in a VPC. I found I needed to explicitly add my local IP/CIDR to the inbound rules for my security group.

    You can find the menu in the AWS console at Services>VPC>Security Groups. Then click to edit your security group, and you should see the inbound rules tab at the bottom of the page. Example:


    I was unfamiliar with CIDR prior to this, but 32 seems to be the default CIDR. In my case, I added an inbound rule to allow traffic from xx.xxx.xxx.xx/32 - xx.xxx.xxx.xx being my local IP address.

    0 讨论(0)
  • 2020-12-18 22:15

    You have to add your IP address block into the security group for the cluster.

    This is separate from other security groups (i.e. VPC).

    You can find it on the left in the Redshift Console. https://console.aws.amazon.com/redshift/

    0 讨论(0)
  • 2020-12-18 22:16

    Looks like you were to resolve the issue only by connecting from an EC2 machine within your VPC. This means that you didn't make the Redshift cluster publicly available, which is one of the options you have when starting up a cluster.

    0 讨论(0)
  • 2020-12-18 22:28

    For EC2 instance in the same VPC, you have to add the CIDR/IP of the private IP to the security group rules, i.e., instead of the public IP of 54.191.XXX.XXX, you should add the private IP of 172.31.XXX.XXX to the ingress rule of your security group.

    0 讨论(0)
提交回复
热议问题