Install and Configure AWS CLI Version 2 Tool On Windows

We can install the AWS CLI tool on windows to handle the AWS cloud servers using the command line. You can download the AWS CLI for windows. We can also install and configure multiple AWS profiles on the Windows machine. Let’s see, how to install AWS and configure CLI on windows.

If you need to change the configuration, you will have to change the access and secret key in the credentials file located at C:\Users\pankaj\.aws folder.

Install and Configure AWS CLI Version 2 Tool On Windows:

AWS CLI tool is available in two versions 1 and 2. So, we’re going to install version 2 if you have installed version 1, you need to uninstall version 1 before installing the version 2. It supports only on 64bit version of windows. we can also configure multiple AWS CLI profiles using their access key on windows.

Check Out: How To Change Default Torrent Program on Ubuntu

We can upload and download the data on AWS s3 using CLI commands on windows. you can find the AWS configuration location under the user profile with the hidden folder .aws

Open the AWS setup and click next. Once it’s installed. You have to open the cmd to check the version installed.

Open CMD using ctrl+r or search for command prompt.

install aws cli

Click on Ok and type aws –version to check the AWS CLI version.

Check Out: Learn Cat Commands With Examples On CentOS 8

You may also find the location of AWS on c drive: C:\Program Files\Amazon\AWSCLIV2

Run the below command to check the version installed.

C:\Users\pankaj>aws --version
aws-cli/2.0.10 Python/3.7.5 Windows/10 botocore/2.0.0dev14

Configuration AWS CLI:

Once you have installed the CLI version on your Windows machine. You won’t be able to perform any task until u don’t configure it.

I have already created a user with programmatic access with Admin right permission.

Check Out: Install and Configure Apache Zookeeper On CentOS 8

Open the command prompt and follow the below instructions. This configuration only for one profile.

C:\Users\pankaj>aws configure
AWS Access Key ID [None]: AKIA3O5k23C7XI7ZFU4T
AWS Secret Access Key [None]: STFj9Qe7z4h1cD/7nITchXTIjjfJEcLP8
Default region name [None]: us-east-1a
Default output format [None]: json

The default output format is available in text, JSON, YAML, and table. If you want to configure more profiles. You need to configure the below commands.

C:\Users\pankaj>aws configure --profile username

You can check the configuration stored at this location C:\Users\pankaj\.aws

aws cli install

Test the configuration:

Now we will test the configuration working properly as per configuration. I will try to check the VPC network using the below commands.

C:\Users\pankaj>aws ec2 describe-vpcs
Could not connect to the endpoint URL: "https://ec2.us-east-1a.amazonaws.com/"

If you’re not able to connect the regions, we have to check the config file under the AWS folder.

Check Out: Configure MySQL Load Balancing With HAProxy On Linux

Go to the location C:\Users\pankaj\.aws

Now open the config file and you will see the code as shown below.

The default code is

[default]
region = us-east-1a
output = json

you need to change the region to region = us-east-1 and save the file. Now try to run the above commands.

aws cli configure

Uninstall AWS CLI From Windows:

If you need to uninstall the old version from your machine, go to the control panel -> then program and features -> look for AWS command-line interface – > right-click on it and uninstall.

Check Out: How To Configure Simple Notification Service(SNS) On AWS Cloud

You can directly open the program and features using appwiz.cpl in the run.

You’re done

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment