DEV Community

Cover image for Building in AWS - Install AWS CLI version 2
Wendy Wong for AWS Community Builders

Posted on • Updated on

Building in AWS - Install AWS CLI version 2

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:

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

Pre-requisites

Step 1: Create an AWS account

Step 2: Create an AWS IAM admin user account

Step 3: Create Multi-Factor Authentication (MFA) on all of your AWS accounts. You may follow for instructions here

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

Tutorial: How to install AWS CLI version 2 for Windows

Please refer to the AWS documentation 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

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

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

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:

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

aws configure

Final Thoughts

There is also an alternative method to install AWS CLI version 2 which is outlined here under Quick setup.

Sample code is provided by AWS in the image below:

sample

Resources

AWS CLI Documentation

AWS Command Line Interface documentation version 2

AWS CLI Command Reference

Until the next lesson, happy learning! 😁

Top comments (0)