Skip to content
/ aws-cli Public
forked from aws/aws-cli

Universal Command Line Interface for Amazon Web Services

License

Notifications You must be signed in to change notification settings

Censio/aws-cli

 
 

Repository files navigation

aws-cli

Build Status

This package provides a unified command line interface to Amazon Web Services.

The aws-cli package works on Python versions:

  • 2.6.5 and greater
  • 2.7.x and greater
  • 3.3.x and greater
  • 3.4.x and greater
  • 3.5.x and greater

Attention!

We recommend that all customers regularly monitor the Amazon Web Services Security Bulletins website for any important security bulletins related to aws-cli.

Installation

The easiest way to install aws-cli is to use pip:

$ pip install awscli

or, if you are not installing in a virtualenv:

$ sudo pip install awscli

If you have the aws-cli installed and want to upgrade to the latest version you can run:

$ pip install --upgrade awscli

This will install the aws-cli package as well as all dependencies. You can also just download the tarball. Once you have the awscli directory structure on your workstation, you can just run:

$ cd <path_to_awscli>
$ python setup.py install

If you want to run the develop branch of the CLI, see the "CLI Dev Version" section below.

CLI Releases

The release notes for the AWS CLI can be found here. You can also find a CHANGELOG in the github repo.

Command Completion

The aws-cli package includes a very useful command completion feature. This feature is not automatically installed so you need to configure it manually. To enable tab completion for bash either use the built-in command complete:

$ complete -C aws_completer aws

Or add bin/aws_bash_completer file under /etc/bash_completion.d, /usr/local/etc/bash_completion.d or any other bash_completion.d location.

For tcsh:

$ complete aws 'p/*/`aws_completer`/'

You should add this to your startup scripts to enable it for future sessions.

For zsh please refer to bin/aws_zsh_completer.sh. Source that file, e.g. from your ~/.zshrc, and make sure you run compinit before:

$ source bin/aws_zsh_completer.sh

For now the bash compatibility auto completion (bashcompinit) is used. For further details please refer to the top of bin/aws_zsh_completer.sh.

Getting Started

Before using aws-cli, you need to tell it about your AWS credentials. You can do this in several ways:

  • Environment variables
  • Shared credentials file
  • Config file
  • IAM Role

The quickest way to get started is to run the aws configure command:

$ aws configure
AWS Access Key ID: foo
AWS Secret Access Key: bar
Default region name [us-west-2]: us-west-2
Default output format [None]: json

To use environment variables, do the following:

$ export AWS_ACCESS_KEY_ID=<access_key>
$ export AWS_SECRET_ACCESS_KEY=<secret_key>

To