AWS-CLI(1)

NAME

aws-cliUniversal Command Line Interface for Amazon Web Services

SYNOPSIS

$pip install awscli

INFO

16.9k stars
4.5k forks
0 views

DESCRIPTION

Universal Command Line Interface for Amazon Web Services

README

aws-cli

.. image:: https://github.com/aws/aws-cli/actions/workflows/run-tests.yml/badge.svg :target: https://github.com/aws/aws-cli/actions/workflows/run-tests.yml :alt: Build Status

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

Jump to:

  • Getting Started <#getting-started>__
  • Getting Help <#getting-help>__
  • More Resources <#more-resources>__

Entering Maintenance Mode on July 15, 2026

We announced <https://aws.amazon.com/blogs/developer/cli-v1-maintenance-mode-announcement/>__ the upcoming end-of-support for the AWS CLI v1. We recommend that you migrate to AWS CLI v2 <https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration.html>__. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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 v2 branch <https://github.com/aws/aws-cli/tree/v2>__.

Requirements


The aws-cli package works on Python versions:
  • 3.9.x and greater
  • 3.10.x and greater
  • 3.11.x and greater
  • 3.12.x and greater
  • 3.13.x and greater
  • 3.14.x and greater

Notices


On 2025-04-22, support for Python 3.8 ended for the AWS CLI. This follows the
Python Software Foundation `end of support &lt;https://peps.python.org/pep-0569/#lifespan&gt;`__
for the runtime which occurred on 2024-10-07.
For more information, see this `blog post &lt;https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/&gt;`__.

*Attention!*

*We recommend that all customers regularly monitor the* `Amazon Web
Services Security Bulletins
website &lt;https://aws.amazon.com/security/security-bulletins&gt;`__ *for
any important security bulletins related to aws-cli.*

Maintenance and Support for CLI Major Versions
</code></pre>
<p>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.</p>
<p>For information about maintenance and support for SDK major versions and their underlying dependencies, see the <code>Maintenance Policy &lt;https://docs.aws.amazon.com/credref/latest/refdocs/maint-policy.html&gt;</code>__ section in the <em>AWS SDKs and Tools Shared Configuration and Credentials Reference Guide</em>.</p>
<p>Installation</p>
<pre><code>
Installation of the AWS CLI and its dependencies use a range of packaging
features provided by ``pip`` and ``setuptools``. To ensure smooth installation,
it&#39;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
`pip &lt;https://pip.pypa.io/en/stable/&gt;`__ in a ``virtualenv``:

::

   $ python -m pip install awscli

or, if you are not installing in a ``virtualenv``, 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 ``six`` that
   came with ``distutils`` in El Capitan, use the ``--ignore-installed``
   option:

::

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

On Linux and Mac OS, the AWS CLI can be installed using a `bundled
installer &lt;https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-bundled&gt;`__.
The AWS CLI can also be installed on Windows via an `MSI
Installer &lt;https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html#msi-on-windows&gt;`__.

If you want to run the ``develop`` branch of the AWS CLI, see the
`Development Version &lt;CONTRIBUTING.md#cli-development-version&gt;`__ section of
the contributing guide.

See the
`installation &lt;https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html&gt;`__
section of the AWS CLI User Guide for more information.

Configuration
</code></pre>
<p>Before using the AWS CLI, you need to configure your AWS credentials.
You can do this in several ways:</p>
<ul>
<li>Configuration command</li>
<li>Environment variables</li>
<li>Shared credentials file</li>
<li>Config file</li>
<li>IAM Role</li>
</ul>
<p>The quickest way to get started is to run the <code>aws configure</code> command:</p>
<p>::</p>
<p>   $ 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</p>
<p>To use environment variables, do the following:</p>
<p>::</p>
<p>   $ export AWS_ACCESS_KEY_ID=<access_key>
   $ export AWS_SECRET_ACCESS_KEY=<secret_key></p>
<p>To use the shared credentials file, create an INI formatted file like
this:</p>
<p>::</p>
<p>   [default]
   aws_access_key_id=MYACCESSKEY
   aws_secret_access_key=MYSECRETKEY</p>
<p>   [testing]
   aws_access_key_id=MYACCESSKEY
   aws_secret_access_key=MYSECRETKEY</p>
<p>and place it in <code>~/.aws/credentials</code> (or in
<code>%UserProfile%\.aws/credentials</code> 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:</p>
<p>::</p>
<p>   $ export AWS_SHARED_CREDENTIALS_FILE=/path/to/shared_credentials_file</p>
<p>To use a config file, create an INI formatted file like this:</p>
<p>::</p>
<p>   [default]
   aws_access_key_id=<default access key>
   aws_secret_access_key=<default secret key></p>
<h1>Optional, to define default region for this profile.</h1>
<p>   region=us-west-1</p>
<p>   [profile testing]
   aws_access_key_id=<testing access key>
   aws_secret_access_key=<testing secret key>
   region=us-west-2</p>
<p>and place it in <code>~/.aws/config</code> (or in <code>%UserProfile%\.aws\config</code>
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:</p>
<p>::</p>
<p>   $ export AWS_CONFIG_FILE=/path/to/config_file</p>
<p>As you can see, you can have multiple <code>profiles</code> defined in both the
shared credentials file and the configuration file. You can then specify
which profile to use by using the <code>--profile</code> option. If no profile is
specified the <code>default</code> profile is used.</p>
<p>In the config file, except for the default profile, you <strong>must</strong> prefix
each config section of a profile group with <code>profile</code>. For example, if
you have a profile named &quot;testing&quot; the section header would be
<code>[profile testing]</code>.</p>
<p>The final option for credentials is highly recommended if you are using
the AWS CLI on an EC2 instance. <code>IAM Roles &lt;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html&gt;</code>__
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.</p>
<p>In addition to credentials, a number of other variables can be
configured either with environment variables, configuration file
entries, or both. See the <code>AWS Tools and SDKs Shared Configuration and Credentials Reference Guide &lt;https://docs.aws.amazon.com/credref/latest/refdocs/overview.html&gt;</code>__
for more information.</p>
<p>For more information about configuration options, please refer to the
<code>AWS CLI Configuration Variables topic &lt;http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#cli-aws-help-config-vars&gt;</code>__.
You can access this topic from the AWS CLI as well by running
<code>aws help config-vars</code>.</p>
<p>Basic Commands</p>
<pre><code>
An AWS CLI command has the following structure:

::

   $ aws &lt;command&gt; &lt;subcommand&gt; [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 &lt;command&gt; help
   $ aws &lt;command&gt; &lt;subcommand&gt; help

To get the version of the AWS CLI:

::

   $ aws --version

To turn on debugging output:

::

   $ aws --debug &lt;command&gt; &lt;subcommand&gt;

You can read more information on the `Using the AWS
CLI &lt;https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-using.html&gt;`__
chapter of the AWS CLI User Guide.

Command Completion
</code></pre>
<p>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 <code>AWS CLI Command completion topic &lt;https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html&gt;</code>__.</p>
<h2>Getting Help</h2>
<p>The best way to interact with our team is through GitHub. You can <code>open an issue &lt;https://github.com/aws/aws-cli/issues/new/choose&gt;</code>__ and
choose from one of our templates for guidance, bug reports, or feature
requests.</p>
<p>You may find help from the community on <code>Stack Overflow &lt;https://stackoverflow.com/&gt;</code>__ with the tag
<code>aws-cli &lt;https://stackoverflow.com/questions/tagged/aws-cli&gt;</code>__ or on
the <code>AWS Discussion Forum for CLI &lt;https://forums.aws.amazon.com/forum.jspa?forumID=150&gt;</code><strong>. If you
have a support plan with <code>AWS Support &lt;https://aws.amazon.com/premiumsupport&gt;</code></strong>, you can also create
a new support case.</p>
<p>Please check for open similar
<code>issues &lt;https://github.com/aws/aws-cli/issues/&gt;</code>__ before opening
another one.</p>
<p>The AWS CLI implements AWS service APIs. For general issues regarding
the services or their limitations, you may find the <code>Amazon Web Services Discussion Forums &lt;https://forums.aws.amazon.com/&gt;</code>__ helpful.</p>
<h2>More Resources</h2>
<ul>
<li><code>Changelog &lt;https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst&gt;</code>__</li>
<li><code>AWS CLI Documentation &lt;https://docs.aws.amazon.com/cli/index.html&gt;</code>__</li>
<li><code>AWS CLI User Guide &lt;https://docs.aws.amazon.com/cli/latest/userguide/&gt;</code>__</li>
<li><code>AWS CLI Command Reference &lt;https://docs.aws.amazon.com/cli/latest/reference/&gt;</code>__</li>
<li><code>Amazon Web Services Discussion Forums &lt;https://forums.aws.amazon.com/&gt;</code>__</li>
<li><code>AWS Support &lt;https://console.aws.amazon.com/support/home#/&gt;</code>__</li>
</ul>
<p>.. |Build Status| image:: <a href="https://travis-ci.org/aws/aws-cli.svg?branch=develop">https://travis-ci.org/aws/aws-cli.svg?branch=develop</a>
   :target: <a href="https://travis-ci.org/aws/aws-cli">https://travis-ci.org/aws/aws-cli</a>
.. |Gitter| image:: <a href="https://badges.gitter.im/aws/aws-cli.svg">https://badges.gitter.im/aws/aws-cli.svg</a>
   :target: <a href="https://gitter.im/aws/aws-cli">https://gitter.im/aws/aws-cli</a></p>

SEE ALSO

clihub3/4/2026AWS-CLI(1)