Menu
Amazon Redshift
Management Guide (API Version 2012-12-01)

Configure a JDBC Connection

You can use a JDBC connection to connect to your Amazon Redshift cluster from many third-party SQL client tools. To do this, you need to download a JDBC driver. Follow the steps in this section if you want to use a JDBC connection.

Download the Amazon Redshift JDBC Driver

Amazon Redshift offers drivers for tools that are compatible with either the JDBC 4.2 API, JDBC 4.1 API, or JDBC 4.0 API. For information about the functionality supported by these drivers, go to the Amazon Redshift JDBC Driver Release Notes.

Download one of the following, depending on the version of the JDBC API that your SQL client tool or application uses:

Then download and review the Amazon Redshift JDBC Driver License Agreement.

If you need to distribute these drivers to your customers or other third parties, please email redshift-pm@amazon.com to arrange an appropriate license.

Previous JDBC Driver Versions

Download a previous version of the Amazon Redshift JDBC driver only if your tool requires a specific version of the driver. For information about the functionality supported in previous versions of the drivers, download Amazon Redshift JDBC Driver Release Notes.

These are previous JDBC 4.1–compatible drivers:

These are previous JDBC 4.0–compatible drivers:

Obtain the JDBC URL

Before you can connect to your Amazon Redshift cluster from a SQL client tool, you need to know the JDBC URL of your cluster. The JDBC URL has the following format:

jdbc:redshift://endpoint:port/database

Note

A JDBC URL specified with the former format of jdbc:postgresql://endpoint:port/database will still work.

FieldValue
jdbcThe protocol for the connection.
redshiftThe subprotocol that specifies to use the Amazon Redshift driver to connect to the database.
endpointThe endpoint of the Amazon Redshift cluster.
portThe port number that you specified when you launched the cluster. If you have a firewall, ensure that this port is open for you to use.
databaseThe database that you created for your cluster.

The following is an example JDBC URL: jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazonaws.com:5439/dev

To obtain your JDBC URL

  1. Sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshift/.

  2. At top right, select the region in which you created your cluster.

    If you followed the Amazon Redshift Getting Started, select US West (Oregon).

  3. In the left navigation pane, click Clusters, and then click your cluster.

    If you followed the Amazon Redshift Getting Started, click examplecluster.

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

If the client computer fails to connect to the database, you can troubleshoot possible issues. For more information, see Troubleshooting Connection Issues in Amazon Redshift.