Menu
Amazon Simple Email Service
Developer Guide (API Version 2010-12-01)

Step 2: Connect to Your Amazon Redshift Cluster

Now you will connect to your cluster by using a SQL client tool. For this tutorial, you use the SQL Workbench/J client that you installed in the prerequisites section.

Complete this section by performing the following steps:

Getting Your Connection String

The following procedure shows how to get the connection string that you will need to connect to your Amazon Redshift cluster from SQL Workbench/J.

To get your connection string

  1. In the Amazon Redshift console, in the navigation pane, choose Clusters.

  2. To open your cluster, choose your cluster name.

  3. On the Configuration tab, under Cluster Database Properties, copy the JDBC URL of the cluster.

    Note

    The endpoint for your cluster is not available until the cluster is created and in the available state.

Connecting to Your Cluster From SQL Workbench/J

The following procedure shows how to connect to your cluster from SQL Workbench/J. This procedure assumes that you installed SQL Workbench/J on your computer as described in Prerequisites.

To connect to your cluster from SQL Workbench/J

  1. Open SQL Workbench/J.

  2. Choose File, and then choose Connect window.

  3. Choose the Create a new connection profile button.

  4. In the New profile text box, type a name for the profile.

  5. At the bottom of the window, on the left, choose Manage Drivers.

  6. In the Manage Drivers dialog box, choose the Create a new entry button, and then add the driver as follows.

    1. In the Name box, type a name for the driver.

    2. Next to Library, choose the folder icon.

    3. Navigate to the location of the driver you downloaded in Configure a JDBC Connection, select the driver, and then choose Open.

    4. Choose OK.

      You will be taken back to the Select Connection Profile dialog box.

  7. For Driver, choose the driver that you just added.

  8. For URL, paste the JDBC URL that you copied from the Amazon Redshift console.

  9. For Username, type the username that you chose when you set up the Amazon Redshift cluster.

  10. For Password, type the password that you chose when you set up the Amazon Redshift cluster.

  11. Select Autocommit.

  12. To test the connection, choose Test.

    Note

    If the connection attempt times out, you might need to add your IP address to the security group that allows incoming traffic from IP addresses. For more information, see The Connection Is Refused or Fails in the Amazon Redshift Database Developer Guide.

  13. On the top menu bar, choose the Save profile list button.

  14. Choose OK.

    SQL Workbench/J will connect to your Amazon Redshift cluster.

Next Step

Step 3: Create a Database Table