Install the AWS Command Line Interface on Microsoft Windows

There are two ways to install AWS CLI:

MSI Installer

a) Download the appropriate MSI installer 64-bit or 32-bit.

b) Run the downloaded MSI installer, and follows the instructions on screen.
  By default, the CLI is installed onto:

C:\Program Files\Amazon\AWSCLI (64-bit) or
C:\Program Files (x86)\Amazon\AWSCLI (32-bit)

c) Test the installation.

C:\>aws --version 
aws-cli/1.11.84 Python/3.6.2 Windows/7 botocore/1.5.47

d)  Updating an MSI Installation.

To update to the latest version, download and run the MSI installer again as detailed above.

e) Uninstall AWS CLI Components.

Control Panel -> All Control Panel Items -> Programs and Features. Select the entry named AWS Command Line Interface and click Uninstall to launch the uninstaller.

Install Python, pip, and the AWS CLI

a) To install Python 3.6 and pip (Windows).

i. Download the Python 3.6 Windows x86-64 executable installer from the downloads page of Python.org.

ii. Run the installer, then click “Install Now” ( C:\Program Files\Python36 )
Tick “Install Launcher for all users ( recommended)
Tick “Add Python 3.6 to PATH”

iii. Until see the below “Setup was successful” screen.

Python_installation

b) To install the AWS CLI with pip (Windows).

i. Open Command Prompt, and verify Python and pip are both installed successfully.

C:\>python --version
Python 3.6.3

c:\>pip --version
pip 9.0.1 from c:\program files\python36\lib\site-packages (python 3.6)

ii. Install the AWS CLI using pip, Run as Administrator user if not Administrator user.

C:\>pip install awscli

Collecting awscli
  Downloading awscli-1.11.185-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 930kB/s

Collecting docutils>=0.10 (from awscli)
  Downloading docutils-0.14-py3-none-any.whl (543kB)
    100% |████████████████████████████████| 552kB 1.8MB/s

Collecting rsa<=3.5.0,>=3.1.2 (from awscli)
  Downloading rsa-3.4.2-py2.py3-none-any.whl (46kB)
    100% |████████████████████████████████| 51kB 6.4MB/s

Collecting colorama<=0.3.7,>=0.2.5 (from awscli)
  Downloading colorama-0.3.7-py2.py3-none-any.whl

Collecting botocore==1.7.43 (from awscli)
  Downloading botocore-1.7.43-py2.py3-none-any.whl (3.7MB)
    100% |████████████████████████████████| 3.7MB 286kB/s

Collecting PyYAML<=3.12,>=3.10 (from awscli)
  Downloading PyYAML-3.12.tar.gz (253kB)
    100% |████████████████████████████████| 256kB 3.5MB/s

Collecting s3transfer<0.2.0,>=0.1.9 (from awscli)
  Downloading s3transfer-0.1.11-py2.py3-none-any.whl (54kB)
    100% |████████████████████████████████| 61kB 6.8MB/s

Collecting pyasn1>=0.1.3 (from rsa<=3.5.0,>=3.1.2->awscli)
  Downloading pyasn1-0.3.7-py2.py3-none-any.whl (63kB)
    100% |████████████████████████████████| 71kB 6.0MB/s

Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.7.43->awscli)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 3.8MB/s

Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.7.43->awscli)
  Downloading jmespath-0.9.3-py2.py3-none-any.whl

Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.7.43->awscli)
  Downloading six-1.11.0-py2.py3-none-any.whl

Installing collected packages: docutils, pyasn1, rsa, colorama, six, python-date
util, jmespath, botocore, PyYAML, s3transfer, awscli

  Running setup.py install for PyYAML ... done

Successfully installed PyYAML-3.12 awscli-1.11.185 botocore-1.7.43 colorama-0.3.
7 docutils-0.14 jmespath-0.9.3 pyasn1-0.3.7 python-dateutil-2.6.1 rsa-3.4.2 s3tr
ansfer-0.1.11 six-1.11.0

iii. Verify that the AWS CLI is installed correctly.

c:\>aws --version
aws-cli/1.11.185 Python/3.6.3 Windows/2012ServerR2 botocore/1.7.43

Vi. To upgrade to the latest version, run the installation command again:

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>pip install --user --upgrade awscli
Requirement already up-to-date: awscli in c:\program files\python36\lib\site-pac
kages
Requirement already up-to-date: rsa<=3.5.0,>=3.1.2 in c:\program files\python36\
lib\site-packages (from awscli)
Requirement already up-to-date: colorama<=0.3.7,>=0.2.5 in c:\program files\pyth
on36\lib\site-packages (from awscli)
Requirement already up-to-date: docutils>=0.10 in c:\program files\python36\lib\
site-packages (from awscli)
Requirement already up-to-date: botocore==1.7.43 in c:\program files\python36\li
b\site-packages (from awscli)
Requirement already up-to-date: s3transfer<0.2.0,>=0.1.9 in c:\program files\pyt
hon36\lib\site-packages (from awscli)
Requirement already up-to-date: PyYAML<=3.12,>=3.10 in c:\program files\python36
\lib\site-packages (from awscli)
Requirement already up-to-date: pyasn1>=0.1.3 in c:\program files\python36\lib\s
ite-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in c:\program files\pytho
n36\lib\site-packages (from botocore==1.7.43->awscli)
Requirement already up-to-date: python-dateutil<3.0.0,>=2.1 in c:\program files\
python36\lib\site-packages (from botocore==1.7.43->awscli)
Requirement already up-to-date: six>=1.5 in c:\program files\python36\lib\site-p
ackages (from python-dateutil<3.0.0,>=2.1->botocore==1.7.43->awscli)

C:\Windows\system32>

Adding the AWS CLI Executable to your Command Line Path

After installing with pip, add the aws executable to your OS’s PATH environment variable. With an MSI installation, this should happen automatically, but you may need to set it manually if the aws command is not working.

  • Python 3.6 and pip%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts
  • MSI installer (64-bit)C:\Program Files\Amazon\AWSCLI
  • MSI installer (32-bit)C:\Program Files (x86)\Amazon\AWSCLI
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: