Menu
Amazon Kinesis Streams
Developer Guide

Install and Configure the AWS CLI

Install AWS CLI

This section describes how to install the AWS CLI for Windows and for Linux, OS X, and Unix operating systems.

Windows

  1. Download the appropriate MSI installer from the Windows section of the full installation instructions in the AWS Command Line Interface User Guide.

  2. Run the downloaded MSI installer.

  3. Follow the instructions that appear.

Linux, macOS, or Unix

These steps require Python 2.6.3 or higher. If you have any problems, see the full installation instructions in the AWS Command Line Interface User Guide.

  1. Download and run the installation script from the pip website:

    Copy
    curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" sudo python get-pip.py
  2. Install the AWS CLI Using Pip.

    Copy
    sudo pip install awscli

Use the following command to list available options and services:

Copy
aws help

You will be using the Streams service, so you can review the AWS CLI subcommands related to Streams using the following command:

Copy
aws kinesis help

This command results in output that includes the available Streams commands:

Copy
AVAILABLE COMMANDS o add-tags-to-stream o create-stream o delete-stream o describe-stream o get-records o get-shard-iterator o help o list-streams o list-tags-for-stream o merge-shards o put-record o put-records o remove-tags-from-stream o split-shard o wait

This command list corresponds to the Streams API documented in the Amazon Kinesis Service API Reference. For example, the create-stream command corresponds to the CreateStream API action.

The AWS CLI is now successfully installed, but not configured. This is shown in the next section.

Configure AWS CLI

For general use, the aws configure command is the fastest way to set up your AWS CLI installation. This is a one-time setup if your preferences don't change because the AWS CLI remembers your settings between sessions.

Copy
aws configure AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: json

The AWS CLI will prompt you for four pieces of information. The AWS access key ID and the AWS secret access key are your account credentials. If you don't have keys, see Sign Up for Amazon Web Services.

The default region is the name of the region you want to make calls against by default. This is usually the region closest to you, but it can be any region.

Note

You must specify an AWS region when using the AWS CLI. For a list of services and available regions, see Regions and Endpoints.

The default output format can be either json, text, or table. If you don't specify an output format, json will be used.

For more information about the files that aws configure creates, additional settings, and named profiles, see Configuring the AWS Command Line Interface in the AWS Command Line Interface User Guide.