User guide

Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20121207/us-
east-1/redshift/aws4_request,
SignedHeaders=content-type;host;x-amz-date,
Signature=9a6b557aa9f38dea83d9215d8f0eae54100877f3e0735d38498d7ae489117920
Setting Up the Amazon Redshift CLI
This section explains how to set up and run the AWS CLI command line tools for use in managing Amazon
Redshift.The Amazon Redshift command line tools run on the AWS Command Line Interface (AWS CLI),
which in turn uses Python (http://www.python.org/).The AWS CLI can be run on any operating system
that supports Python.
Installation Instructions
To begin using the Amazon Redshift command line tools, you first set up the AWS CLI, and then you add
configuration files that define the Amazon Redshift CLI options.
If you have already installed and configured the AWS CLI for another AWS service, you can skip this
procedure.
To install the AWS Command Line Interface
1. Go to Getting Set Up with the AWS Command Line Interface, and then follow the instructions for
installing the AWS CLI.
For CLI access, you need an access key ID and secret access key. For more information about
creating access keys, see How Do I Get Security Credentials? in the AWS General Reference.
2. Create a file containing configuration information such as your access keys, default region, and
command output format. Then set the AWS_CONFIG_FILE environment variable to reference that
file. For detailed instructions, go to Configuring the AWS Command Line Interface in the AWS
Command Line Interface User Guide.
3. Run a test command to confirm that the AWS CLI interface is working. For example, the following
command should display help information for the AWS CLI:
aws help
The following command should display help information for Amazon Redshift:
aws redshift help
For reference material on the Amazon Redshift CLI commands, go to Amazon Redshift in the AWS CLI
Reference.
Getting Started with the AWS Command Line Interface
Topics
Step 1: Before You Begin (p. 135)
Step 2: Launch a Cluster (p. 135)
Step 3: Authorize Inbound Traffic for Cluster Access (p. 136)
Step 4: Connect to Your Cluster (p. 137)
Step 5: Create Tables, Upload Data, and Try Example Queries (p. 138)
API Version 2012-12-01
134
Amazon Redshift Management Guide
Setting Up the Amazon Redshift CLI