AWS Command Line Interface
User Guide

Installing the AWS Command Line Interface

This section discusses various ways to install and update the AWS CLI. To see if you have the latest version, go to the release notes.


The AWS CLI comes pre-installed on the Amazon Linux AMI. Run sudo yum update after connecting to the instance to get the latest version of the package available via yum. If you need a more recent version of the AWS CLI than what is available in the Amazon updates repository, uninstall the package (sudo yum remove aws-cli) and then install using pip.

Choose an Installation Method

There are a number of different ways to install the AWS CLI on your machine, depending on what operating system and environment you are using:

  • On Microsoft Windows – use the MSI installer.

  • On Linux, OS X, or Unix – use pip (a package manager for Python software) or install manually with the bundled installer.


On OS X, if you see an error regarding the version of six that came with distutils in El Capitan, use the --ignore-installed option:

$ sudo pip install awscli --ignore-installed six

The awscli package may be available in repositories for other package managers such as APT, yum and Homebrew, but it is not guaranteed to be the latest version. To make sure you have the latest version, use one of the installation methods described here.

Install the AWS CLI Using the MSI Installer (Windows)

The AWS CLI is supported on Microsoft Windows XP or later. For Windows users, the MSI installation package offers a familiar and convenient way to install the AWS CLI without installing any other prerequisites. Windows users should use the MSI installer unless they are already using pip for package management.

To install the AWS CLI using the MSI installer

  1. Download the appropriate MSI installer.


    The MSI installer for the AWS CLI does not currently work with Windows Server 2008 (version 6.0.6002). Use pip to install with this version of Windows.

  2. Run the downloaded MSI installer.

  3. Follow the instructions that appear.

The CLI installs to C:\Program Files\Amazon\AWSCLI (64-bit) or C:\Program Files (x86)\Amazon\AWSCLI (32-bit) by default. To confirm the installation, use the aws --version command at a command prompt (open the START menu and search for "cmd" if you're not sure where the command prompt is installed).

> aws --version
aws-cli/1.7.36 Python/2.7.9 Windows/7

Don't include the prompt symbol ('>' above) when you type a command. These are included in program listings to differentiate commands that you type from output returned by the CLI. The rest of this guide uses the generic prompt symbol '$' except in cases where a command is Windows-specific.

If Windows is unable to find the executable, you may need to re-open the command prompt or add the installation directory to your PATH environment variable manually.

Updating an MSI Installation

The AWS CLI is updated regularly. Check out the Releases page on GitHub to see when the latest version was released. To update to the latest version, download and run the MSI installer again as detailed above.

Install the AWS CLI Using Pip

Pip is a Python-based tool that offers convenient ways to install, upgrade, and remove Python packages and their dependencies. Pip is the recommended method of installing the CLI on Mac and Linux.


  • Windows, Linux, OS X, or Unix

  • Python 2 version 2.6.5+ or Python 3 version 3.3+

  • Pip

First, check to see if you already have Python installed:

$ python --version

If you don't have Python installed, follow the procedure at Install Python to set it up.

Next, check pip:

$ pip --help

If you don't have pip installed. follow the procedure at Install pip.

Install Python

If you don't have Python installed, install version 2.7 or 3.4 using one of the following methods:

On Windows or OS X, download the Python package for your operating system from and run the installer. These installers include pip.

On Linux, OS X, or Unix, install Python using your distribution's package manager.

To install Python 2.7 on Linux

  1. Check to see if Python is already installed:

    $ python --version


    If your Linux distribution came with Python, you may need to install the Python developer package in order to get the headers and libraries required to compile extensions and install the AWS CLI. Install the developer package (typically named python-dev or python-devel) using your package manager.

  2. If Python 2.7 or later is not installed, install it with your distribution's package manager. The command and package name varies:

    • On Debian derivatives such as Ubuntu, use APT:

      $ sudo apt-get install python2.7
    • On Red Hat and derivatives, use yum:

      $ sudo yum install python27
    • On SUSE and derivatives, use zypper:

      $ sudo zypper install python
  3. Open a command prompt or shell and run the following command to verify that Python installed correctly:

    $ python --version
    Python 2.7.9

Install pip

Install pip by using the script provided by the Python Packaging Authority.

To install pip on Linux

  1. Download the installation script from

    $ curl -O

    The script downloads and installs the latest version of pip and another required package named setuptools.

  2. Run the script with Python:

    $ sudo python27
    Collecting pip
      Downloading pip-6.1.1-py2.py3-none-any.whl (1.1MB)
    Collecting setuptools
      Downloading setuptools-15.0-py2.py3-none-any.whl (501kB)
    Installing collected packages: pip, setuptools
    Successfully installed pip-6.1.1 setuptools-15.0

    Invoking version 2.7 of Python directly by using the python27 command instead of python ensures that pip is installed in the proper location, even if an older system version of Python is present on your system. If the system version is supported you can just use python. The name of the executable may vary depending on your package manager (for example, python2.7).

Install the AWS CLI Using pip

With Python and pip installed, use pip to install the AWS CLI:


> pip install awscli

To upgrade an existing AWS CLI installation, use the --upgrade option:

> pip install --upgrade awscli

Linux, OS X, or Unix

$ sudo pip install awscli

If you see an error regarding the version of six that came with distutils in El Capitan, use the --ignore-installed option:

$ sudo pip install awscli --ignore-installed six


If you installed a new version of Python alongside an older version that came with your distribution, or update pip to the latest version, you may get an error like the following when trying to invoke pip with sudo:

sudo: pip: command not found

To work around this issue, use which pip to locate the executable, and then invoke it directly by using an absolute path when installing the AWS CLI:

$ which pip
$ sudo /usr/local/bin/pip install awscli

To upgrade an existing AWS CLI installation, use the --upgrade option:

$ sudo pip install --upgrade awscli

Pip installs the aws executable to /usr/bin/aws. The awscli library (which does the actual work) is installed to the 'site-packages' folder in Python's installation directory.

Install the AWS CLI Using the Bundled Installer (Linux, OS X, or Unix)

If you are on Linux, OS X, or Unix, you can also use the bundled installer to install the AWS CLI. The bundled installer handles all the details in setting up an isolated environment for the AWS CLI and its dependencies. You don't have to be fluent in advanced pip/virtualenv usage, nor do you have to worry about installing pip.


  • Linux, OS X, or Unix

  • Python 2 version 2.6.5+ or Python 3 version 3.3+

Check your Python installation:

$ python --version

If your computer doesn't already have Python installed, or you would like to install a different version of Python, follow the procedure in Install Python.

Install the AWS CLI Using the Bundled Installer

Follow these steps from the command line to install the AWS CLI using the bundled installer.

To install the AWS CLI using the bundled installer

  1. Download the AWS CLI Bundled Installer using wget or curl.

  2. Unzip the package.

  3. Run the install executable.

On Linux and OS X, here are the three commands that correspond to each step:

$ curl "" -o ""
$ unzip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

If you don't have unzip, use your Linux distribution's built in package manager to install it, typically with either sudo yum install unzip or sudo apt-get install unzip.


By default, the install script runs under the system default version of Python. If you have installed an alternative version of Python and want to use that to install the AWS CLI, run the install script with that version by absolute path to the Python executable. For example:

$ sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

The third command installs the AWS CLI at /usr/local/aws and create the symlink aws at the /usr/local/bin directory. Using the -b option to create a symlink eliminates the need to specify the install directory in the user's $PATH variable. This should enable all users to call the AWS CLI by typing aws from any directory.


The bundled installer does not support installing to paths that contain spaces.

To see an explanation of the -i and -b options, use the -h option:

$ ./awscli-bundle/install -h

Install the AWS CLI Without Sudo (Linux, OS X, or Unix)

If you don't have sudo permissions or want to install the AWS CLI only for the current user, you can use a modified version of the above commands:

$ curl "" -o ""
$ unzip
$ ./awscli-bundle/install -b ~/bin/aws

This will install the AWS CLI to the default location (~/.local/lib/aws) and create a symbolic link (symlink) at ~/bin/aws. Make sure that ~/bin is in your PATH environment variable for the symlink to work:

$ echo $PATH | grep ~/bin     // See if $PATH contains ~/bin (output will be empty if it doesn't)
$ export PATH=~/bin:$PATH     // Add ~/bin to $PATH if necessary


To ensure that your $PATH settings are retained between sessions, add the export line to your shell profile (~/.profile, ~/.bash_profile, etc).

Test the AWS CLI Installation

Confirm that the CLI is installed correctly by viewing the help file. Open a terminal, shell or command prompt, enter aws help and press Enter:

$ aws help

Where to Go from Here

Once you have the AWS CLI installed, you should configure it for use with AWS.