Connect to Your Cluster by Using the psql Tool
After you create an Amazon Redshift cluster, you can use psql, a terminal-based front end from
PostgreSQL, to query the data in your cluster. You can type the queries interactively or read them from
a file. To connect from psql, you must specify the cluster endpoint, database, and port.
Note
Amazon Redshift does not provide the psql tool; it is installed with PostgreSQL. For information
about using psql, go to
http://www.postgresql.org/docs/8.4/static/app-psql.html
. For information
about installing the PostgreSQL client tools, select your operating system from the PostrgreSQL
binary downloads page at
http://www.postgresql.org/download/
.
Connect by Using the psql Defaults
By default, psql does not validate the Amazon Redshift service; it makes an encrypted connection by
using Secure Sockets Layer (SSL).
To connect by using psql defaults
1.
Sign in to the AWS Management Console and open the Amazon Redshift console at
https://console.aws.amazon.com/redshift/
.
2.
In the content pane, select the check box for the cluster that you want. Under Cluster Database
Properties, record the values of Endpoint, Port, and Database Name.
API Version 2012-12-01
103
Amazon Redshift Management Guide
Connect to Your Cluster by Using the psql Tool