AWS provides a set of command line tools, to give administrators and developers access to manage their own AWS services using local clients besides management console access

AWS CLI v2 Setup
In the following steps, we will go through how to set up and configure AWS CLI to connect to your AWS account and manage your services
1- First step is to install MSI File from the link https://awscli.amazonaws.com/AWSCLIV2.msi
2- Double click on MSI installer as shown

3- Installer will start, click on Next

4- Check “I accept the terms …” option, then click on Next

5- Choose the location of the installation, then click on Next

6- Click on install to start the installation

7- Click on Finish

8- From your keyboard click on “Windows button” + R, then type cmd

9- To check that installation done successfully open a command prompt then type aws –version

AWS CLI v2 Configuration
After AWS CLI installation, next step we need to configure CLI with AWS security keys, and we will learn how to create multiple profiles with different AWS security keys. to get configuration we need to get:
- AWS Access Key ID
- AWS Secret Access Key
1- First we need to get security keys from AWS management console, login to your management console with your account
2- Click on your user name then from the drop down menu choose “My Security Credentials“

3- Under Access Keys, you will find your existing Access keys, and in case you don’t have, click on Create New Access Key

4- Access keys will be generated, you can copy the values direct or download the key file, Don’t share these keys with anyone!

5- After creating the keys, you can make them inactive or delete them completely

6- Now to configure the AWS CLI, open a command prompt and type aws configure you will be asked to enter access keys, region, and output format

For output mode we have the following options:
- Json
- Yaml
- Text
- Table
7- Now you can use the AWS CLI to provision different AWS Services such as S3

Create Configuration Profile
We can have multiple profiles and we can access all using the same CLI, in previous we created a configuration for the default profile, let’s say if we need to access services in a different region, or using different access keys, now we will create a new profile to access services in a different region
Syntax: aws configure –profile <profile name>

Now when you need to use profile uswest2 in your command append –profile <profile name> at the end of your command, for example

Note: S3 is a global service and you will get the same results using any profile, but the previous example was just to demonstrate where to place and specify profile name
Now you can use AWS CLI from your command line to provision and control your AWS services.