1
votes

I followed all the steps mentioned on here to connect to Redshift through Workbench J.

I am not using SSH to connect, so have left SSH settings alone.

When I select Security after selecting Redshift, I see :

Your account does not support the EC2-Classic Platform in this region. Cluster Security Groups are only available when the EC2-Classic Platform is supported. Instead, use VPC Security Groups to control access to your clusters. Go to the EC2 Console to view your VPC Security Groups. For more information, see Amazon Redshift Documentation on Supported Platforms and Managing Clusters in VPC.

My cluster is under a Security Group which has the following Inbound rule :

Type: Redshift

Protocol: TCP

Port Range: 5439

Source: Custom 0.0.0.0/0 (Experimental, just to test, 
                          I will replace this with my IP address)

When I do a Netstat on the host from my machine with -Pn. I get a

Host is up.
PORT     STATE    SERVICE
5439/tcp filtered unknown
Nmap done: 1 IP address (1 host up) scanned in 2.22 seconds

I have already gone through several similar questions and none of these is working for me.

1
Can you show us your Redshift configuration? It could be a setting like Publicly Available that is causing you grief.John Rotenstein

1 Answers

2
votes

Double check your Security Group settings:

  1. In the Redshift console, go to the Configuration tab.
  2. Click on the link next to VPC security groups
    • Should take you to Security Groups in the EC2 console with the correct security group selected.
  3. Select the Inbound tab for the security group and click the Edit button (a dialog box opens).
  4. In the dialog box, click the Add Rule button then:
    • Select Redshift from the Type dropdown menu
    • Select Anywhere from the Source dropdown menu
      • Come back and change this to My Ip once your connection works!
    • Click the Save button (the dialog closes)
    • You now have 2 new Redshift rules (0.0.0.0/0 AND ::/0)

Then in SQL Workbench's "Select Connection Profile" dialog:

  1. Click "Manage Drivers" at the bottom left and to add the Redshift JDBC driver.
    • SQL Workbench configures these automatically but check that Classname is like com.amazon.redshift.jdbc42.Driver and Sample URL is jdbc:redshift://host:port/name_of_database.
  2. Next, configure the connection
    • Select the new Driver you just created from the drop down.
    • Copy the JDBC URL from the Redshift console Configuration tab and paste it into the URL field.
      • Must use the correct port: jdbc:redshift://my-cluster.asdfgh5jk8.us-east-1.redshift.amazonaws.com:5439/my-db
    • Add your Username and Password
    • Test the connection! (Bottom right)

Please let me know in the comments if this doesn't work for some reason and I'll help you get it working.