Configure Networking and Security Groups
There are two types of Redshift cluster subnets:
- EC2 Classic subnet
- VPC subnet
Let’s see what our cluster supports as it depends on the region you are. To see this, you will have to check your cluster’s Configuration tab. You will either see a field called Cluster Security Groups or VPC Security Groups.
You can find more details about these two subnet types you may check from Amazon the Managing Clusters in an Amazon Virtual Private Cloud (VPC) guide.
Configure Security Groups
Amazon Redshift permissions: EC2-Classic
Click on the name next to Cluster Security Groups.
Then you will see a new page called Security. Click on the name of your Security group. At next page click on Add Connection Type.
In the pop-up choose Connection Type: CIDR/IP and the default IP is your current IP address.
Amazon Redshift permissions: EC2-VPC
For our example case, click on the name next to VPC Security Groups.
Click the Inbound tab and then click on Edit.
We need to add one rule.
In the Type drop-down select Redshift. Then leave the defaults. At Source, in the drop-down select My IP. Leave the default.
Now we are ready to connect to our cluster. There are various tools to connect to your Amazon Redshift cluster, and we will see them later in more detail. For now, we will try a connection with SQL Workbench/J.
Connecting with SQL Workbench/J
Let’s see how to connect with SQL Workbench/J*.
- Download SQL Workbench/J from SQL Workbench.
- Read the Installing and starting SQL Workbench/J page.
- Download the latest Amazon Redshift JDBC drivers from Amazon here.
- Open SQL Workbench/J.
- If the Select Connection Profile does not open, click File, and then Connect.
- Type a name for the profile. For example, The Lannisters.
- Click Manage Drivers.
- In the new window find and select the JAR with the Amazon Redshift JDBC Driver.
- Click OK
- For the rest of settings check the screenshot below.
*For more detailed instructions examine the documentation from AWS here.
Click on Test, and if you see the bellow message, you are in.