Install AWS CLI Using Python and pip On Windows Server 2019 or Windows 10

In this blog post, I will show you how I install AWS CLI using Python and pip on Windows Server 2019 or Window 10.

The reason I have chosen to use AWS CLI with Python is that it is much easier to update AWS CLI compared to when installing it using the Windows installer.

Install Python

To get started with the requirements, first I am installing Python using the latest version from the Python website found below:

Make sure you tick the Add Python 3.7 to PATH before clicking on Install now.

After installing Python, I will confirm it was installed by running the following command:

python --version

Install AWS CLI

To install AWS CLI, I will use the pip package manager, which will download and install AWS CLI for me.

Using the command below, pip will install the latest version of AWS CLI.

pip3 install awscli

To check that AWS CLI was installed I run the command below

aws --version

To update AWS CLI and install the latest version I run the following command

pip3 install --user --upgrade awscli

To start with the AWS CLI configuration type:

aws configure

To use AWS CLI we need to create an access key and a secret key and to generate we need to login to the AWS Management Portal, Click on the My security Credentials usnder the username on top right corner..

From the Security Credentials page, create an access key, and a secret.

Copy them to a secure place and use them in the aws configure wizard to complete the configuration.

After finishing the wizard, I can go ahead and using my AWS CLI commands.

Below, I will check if I have EBS volumes under my EC2 instances.

aws ec2 describe-volumes
Categorized as AWS