User guide
• Step 6: Delete Your Sample Cluster (p. 138)
To help you get started using the command line interface, this section shows how to perform basic
administrative tasks for an Amazon Redshift cluster.These tasks are very similar to those in the Amazon
Redshift Getting Started Guide, but they are focused on the command line interface rather than the
Amazon Redshift console.
This section walks you through the process of creating a cluster, creating database tables, uploading
data, and testing queries.You will use the Amazon Redshift CLI to provision a cluster and to authorize
necessary access permissions.You will then use the SQL Workbench client to connect to the cluster and
create sample tables, upload sample data, and execute test queries.
Step 1: Before You Begin
If you don't already have an AWS account, you must sign up for one. Then you'll need to set up the
Amazon Redshift command line tools. Finally, you'll need to download client tools and drivers in order to
connect to your cluster.
Step 1.1: Sign Up for an AWS account
For information about signing up for an AWS user account, go to the Amazon Redshift Getting Started
Guide.
Step 1.2: Download and Install the AWS Command Line Interface (CLI)
If you have not installed the AWS Command Line Interface, see Setting Up the Amazon Redshift
CLI (p. 134).
Step 1.3: Download the Client Tools and Drivers
You can use any SQL client tools to connect to an Amazon Redshift cluster with PostgreSQL JDBC or
ODBC drivers. If you do not currently have such software installed, you can use SQL Workbench, a free
cross-platform tool that you can use to query tables in an Amazon Redshift cluster. The examples in this
section will use the SQL Workbench client.
To download SQL Workbench and the PostgreSQL drivers, go to the Amazon Redshift Getting Started
Guide.
Step 2: Launch a Cluster
Now you're ready to launch a cluster by using the AWS Command Line Interface (CLI).
Important
The cluster that you're about to launch will be live (and not running in a sandbox).You will incur
the standard usage fees for the cluster until you terminate it. For pricing information, go to the
Amazon Redshift pricing page.
If you complete the exercise described here in one sitting and terminate your cluster when you
are finished, the total charges will be minimal.
The create-cluster command has a large number of parameters. For this exercise, you will use the
parameter values that are described in the following table. Before you create a cluster in a production
environment, we recommend that you review all the required and optional parameters so that your cluster
configuration matches your requirements. For more information, see create-cluster
Parameter Value for This ExerciseParameter Name
exampleclusterCluster Identifier
masteruserMaster Username
API Version 2012-12-01
135
Amazon Redshift Management Guide
Setting Up the Amazon Redshift CLI