Building in AWS - Install AWS CLI version 2
Tags: beginners, aws, tutorial, python
Published: 2022-08-07 13:26:00

## Getting started with AWS

If you are ready to build your next project, there are a few ways that you may interact with AWS such as using the following tools:

* AWS Management Console

* [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)

* [AWS Cloud Development Kit (AWS CDK)](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html)

This blog post will focus on installing AWS CLI version 2 for Windows.

### Pre-requisites

Step 1: Create an [AWS account](https://dev.to/aws-builders/getting-started-with-aws-a-sweet-journey-5cjj)

Step 2: Create an [AWS IAM admin user account](https://dev.to/aws-builders/creating-your-first-iam-admin-user-and-user-group-in-your-aws-account-machine-learning-part-1-3cne)

Step 3: Create Multi-Factor Authentication (MFA) on all of your AWS accounts. You may follow for instructions [here](https://dev.to/aws-builders/create-multi-factor-authentication-mfa-for-your-aws-accounts-2ohm)

Step 4: Prepare to use the the AWS access key ID and secret access key that you created for IAM admin user with programmatic access for configuration.

Or you may create your access key ID and access key by following the instructions [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-prereqs.html)

### Tutorial: How to install AWS CLI version 2 for Windows

Please refer to the [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-prereqs.html) to install AWS CLI version 2.

Step 1: You will need to have administrator permissions to download and install the AWS CLI from the link below:

https://awscli.amazonaws.com/AWSCLIV2.msi


![download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nb0mcm2sngimii31r31d.jpg)

Step 2: On the **Start menu** type the word 'cmd' in the search bar to bring up the **Command Prompt**.

Step 3: In the **Command Prompt** type the command 'aws --version' and press **enter** to verify the version of the AWS CLI that was installed.


![verion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdsyibpmpq26pfmdjgww.jpg)

From the command prompt you can see that AWS CLI version 2.7.7 was installed together with Python version 3.9.11 on the computer.

![I2.7](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gc1tm4p3mac6bxbh0zyu.jpg)

Step 4: Configure the AWS CLI for Windows

Use 'aws configure' to configure the AWS Command Line Interface (AWS CLI) for Windows. Enter the following [details](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-quickstart.html):

* Access key ID
* Secret access key
* AWS region
* Specify json file format

![aws configure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/us5l52s2mzepq8i004xv.jpg)

### Final Thoughts

There is also an alternative method to install AWS CLI version 2 which is outlined [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html) under **Quick setup**.

Sample code is provided by AWS in the image below:


![sample](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ogzb8lqdw99f495b4nsc.jpg)

### Resources

[AWS CLI Documentation]
(https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html)

[AWS Command Line Interface documentation version 2](https://docs.aws.amazon.com/cli/latest/userguide/aws-cli.pdf)

[AWS CLI Command Reference](https://docs.aws.amazon.com/cli/latest/index.html)


Until the next lesson, happy learning! 😁