Setting up the Amazon Redshift CLI - 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).

Setting up the Amazon Redshift CLI

This section explains how to set up and run the Amazon CLI command line tools for use in managing Amazon Redshift. The Amazon Redshift command line tools run on the Amazon Command Line Interface (Amazon CLI), which in turn uses Python ( The Amazon 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 Amazon CLI, and then you add configuration files that define the Amazon Redshift CLI options.

If you have already installed and configured the Amazon CLI for another Amazon service, you can skip this procedure.

To install the Amazon Command Line Interface
  1. Go to Getting set up with the Amazon command line interface, and then follow the instructions for installing the Amazon CLI.

    For CLI access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Best practices for managing Amazon access keys in the Amazon 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 Amazon command line interface in the Amazon Command Line Interface User Guide.

  3. Run a test command to confirm that the Amazon CLI interface is working. For example, the following command should display help information for the Amazon 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 Amazon CLI Reference.