User guide

For more information about connection information string parameters, see http://www.postgresql.org/
docs/8.4/static/libpq-connect.html.
To connect by using a certificate
1. Save the public key from https://s3.amazonaws.com/redshift-downloads/redshift-ssl-ca-cert.pem as
a .pem file to your computer. If you do a File\Save as using Internet Explorer, specify the file type
as Text file (*.txt) and delete the .txt extension. For example, save it as the file
C:\MyDownloads\redshift-ssl-ca-cert.pem.
2. In the Amazon Redshift console, select the cluster to display the Cluster Database Properties.
Record the values displayed in the Endpoint, Port, and Database Name fields.
3. At a command prompt, specify the connection information using a connection information string:
psql "host=<endpoint> user=<userid> dbname=<databasename> port=<port> sslm
ode=verify-ca sslrootcert=<certificate>"
Where:
<endpoint> is the Endpoint you recorded in the previous step.
<userid> is a user ID with permissions to connect to the cluster.
<databasename> is the Database Name you recorded in the previous step.
<port> is the Port you recorded in the previous step.
<certificate> is the full path to the certificate file. On Windows systems, the certificate path
must be specified using Linux-style / separators instead of the Windows \ separator.
For example:
psql "host=examplecluster.<XXXXXXXXXXXX>.us-west-2.redshift.amazonaws.com
user=masteruser dbname=dev port=5439 sslmode=verify-ca sslrootcert=C:/MyDown
loads/redshift-ssl-ca-cert.pem"
API Version 2012-12-01
168
Amazon Redshift Management Guide
Connecting to Clusters From Client Tools and Code