Need help with aws-cli?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

11.1K Stars 2.7K Forks Other 9.4K Commits 711 Opened issues


Universal Command Line Interface for Amazon Web Services

Services available


Need anything else?

Contributors list


.. image:: :target: :alt: Build Status

.. image:: :target: :alt: Gitter

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

Jump to:

  • Getting Started 
  • Getting Help 
  • More Resources 

Getting Started

This README is for the AWS CLI version 1. If you are looking for information about the AWS CLI version 2, please visit the


Requirements ~~~~~~~~~~~~

The aws-cli package works on Python versions:

  • 2.7.x and greater
  • 3.6.x and greater
  • 3.7.x and greater
  • 3.8.x and greater

On 01/15/2021 deprecation for Python 2.7 was announced and support will be dropped on 07/15/2021. To avoid disruption, customers using the AWS CLI on Python 2.7 may need to upgrade their version of Python or pin the version of the AWS CLI. For more information, see this

blog post 

On 10/29/2020 support for Python 3.4 and Python 3.5 was deprecated and support was dropped on 02/01/2021. Customers using the AWS CLI on Python 3.4 or 3.5 will need to upgrade their version of Python to continue receiving feature and security updates. For more information, see this



We recommend that all customers regularly monitor the

Amazon Web
Services Security Bulletins
__ for any important security bulletins related to aws-cli.

Maintenance and Support for CLI Major Versions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The AWS CLI version 1 was made generally available on 09/02/2013 and is currently in the full support phase of the availability life cycle.

For information about maintenance and support for SDK major versions and their underlying dependencies, see the

Maintenance Policy 
__ section in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide.

Installation ~~~~~~~~~~~~

Installation of the AWS CLI and its dependencies use a range of packaging features provided by

. To ensure smooth installation, it's recommended to use:
  • pip
    : 9.0.2 or greater
  • setuptools
    : 36.2.0 or greater

The safest way to install the AWS CLI is to use

__ in a


$ python -m pip install awscli

or, if you are not installing in a

, to install globally:


$ sudo python -m pip install awscli

or for your user:


$ python -m pip install --user awscli

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


$ python -m pip install --upgrade awscli

This will install the aws-cli package as well as all dependencies.

.. note:: On macOS, if you see an error regarding the version of

that came with
in El Capitan, use the


$ sudo python -m pip install awscli --ignore-installed six

On Linux and Mac OS, the AWS CLI can be installed using a

. The AWS CLI can also be installed on Windows via an

If you want to run the

branch of the AWS CLI, see the
Development Version 
__ section of the contributing guide.

See the

__ section of the AWS CLI User Guide for more information.

Configuration ~~~~~~~~~~~~~

Before using the AWS CLI, you need to configure your AWS credentials. You can do this in several ways:

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

The quickest way to get started is to run the

aws configure


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

To use environment variables, do the following:


$ export AWSACCESSKEYID=<accesskey> $ export AWSSECRETACCESSKEY=<secretkey>

To use the shared credentials file, create an INI formatted file like this:


[default] awsaccesskeyid=MYACCESSKEY awssecretaccesskey=MYSECRETKEY

[testing] awsaccesskeyid=MYACCESKEY awssecretaccesskey=MYSECRETKEY

and place it in

(or in
on Windows). If you wish to place the shared credentials file in a different location than the one specified above, you need to tell aws-cli where to find it. Do this by setting the appropriate environment variable:


$ export AWSSHAREDCREDENTIALSFILE=/path/to/sharedcredentials_file

To use a config file, create an INI formatted file like this:


[default] awsaccesskeyid= awssecretaccesskey= # Optional, to define default region for this profile. region=us-west-1

[profile testing] awsaccesskeyid= awssecretaccesskey= region=us-west-2

and place it in

(or in
on Windows). If you wish to place the config file in a different location than the one specified above, you need to tell the AWS CLI where to find it. Do this by setting the appropriate environment variable:


$ export AWSCONFIGFILE=/path/to/config_file

As you can see, you can have multiple

defined in both the shared credentials file and the configuration file. You can then specify which profile to use by using the
option. If no profile is specified the
profile is used.

In the config file, except for the default profile, you must prefix each config section of a profile group with

. For example, if you have a profile named "testing" the section header would be
[profile testing]

The final option for credentials is highly recommended if you are using the AWS CLI on an EC2 instance.

__ are a great way to have credentials installed automatically on your instance. If you are using IAM Roles, the AWS CLI will find and use them automatically.

In addition to credentials, a number of other variables can be configured either with environment variables, configuration file entries, or both. See the

AWS Tools and SDKs Shared Configuration and
Credentials Reference
__ for more information.

For more information about configuration options, please refer to the

AWS CLI Configuration Variables
__. You can access this topic from the AWS CLI as well by running
aws help config-vars

Basic Commands ~~~~~~~~~~~~~~

An AWS CLI command has the following structure:


$ aws [options and parameters]

For example, to list S3 buckets, the command would be:


$ aws s3 ls

To view help documentation, use one of the following:


$ aws help $ aws help $ aws help

To get the version of the AWS CLI:


$ aws --version

To turn on debugging output:


$ aws --debug

You can read more information on the

Using the AWS
__ chapter of the AWS CLI User Guide.

Command Completion ~~~~~~~~~~~~~~~~~~

The aws-cli package includes a command completion feature for Unix-like systems. This feature is not automatically installed so you need to configure it manually. To learn more, read the

AWS CLI Command

Getting Help

The best way to interact with our team is through GitHub. You can

an issue 
__ and choose from one of our templates for guidance, bug reports, or feature requests.

You may find help from the community on

__ with the tag
__ or on the
AWS Discussion Forum for
. If you have a support plan with
AWS Support
, you can also create a new support case.

Please check for open similar

__ before opening another one.

The AWS CLI implements AWS service APIs. For general issues regarding the services or their limitations, you may find the

Amazon Web Services
Discussion Forums 
__ helpful.

More Resources

  • Changelog 
  • AWS CLI User
  • AWS CLI Command
  • Amazon Web Services Discussion
  • AWS Support 

.. |Build Status| image:: :target: .. |Gitter| image:: :target:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.