Building the connection URL - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Building the connection URL

Use the connection URL to supply connection information to the data store that you are accessing. The following is the format of the connection URL for the Amazon Redshift JDBC driver version 2.1. Here, [Host] the endpoint of the Amazon Redshift server and [Port] is the number of the Transmission Control Protocol (TCP) port that the server uses to listen for client requests.


The following is the format of a connection URL that specifies some optional settings.

jdbc:redshift://[Host]:[Port]/[database];[Property1]=[Value]; [Property2]=[Value];

For example, suppose that you want to connect to port 9000 on an Amazon Redshift cluster in the US West (N. California) Region on Amazon. You also want to access the schema named Default and authenticate the connection using a database user name and password. In this case, you use the following connection URL.


You can use the following characters to separate configuration options in the URL string:

  • ;

  • ?

  • &

For example, the following URL strings are equivalent:


The following URL example specifies a log level of 6 and the path for the logs.


Don't duplicate properties in the connection URL.

For a complete list of the configuration options that you can specify, see Options for JDBC driver version 2.1 configuration.