Note: this article is published on 03/08/2025.
Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon that provides on-demand cloud computing platforms and APIs to individuals, companies, and governments on a metered, pay-as-you-go basis.
This series of articles will record one Single task for each.
A - Introduction
This article is to introduce the AWS CLI.
The AWS Command Line Interface (AWS CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. With minimal configuration, the AWS CLI enables you to start running commands that implement functionality equivalent to that provided by the browser-based AWS Management Console from the command prompt.
The content of this article:
- A - Introduction
- B - Install AWS CLI
- C - AWS CLI Configuration
- C.1 - Create Access Key
- C.2 - Configure AWS Console
- C.3 - Test Connection
- C.4 - Corp Sample
B - Install AWS CLI
To check the currently installed version, use the following command:
$ aws --version
Before installation, check if AWS CLI is installed:
![]()
Download AWS CLI
install:
![]()
After installation:
![]()
C - AWS CLI Configuration
The command:
aws configure
Configure AWS console, actually, link the console to AWS server:
![]()
First, we need to create a AWS Access Key, then using the key to configure the AWS Console.
C.1 - Create Access Key
We can get Security Credentials page either from the link below:
![]()
In the Access Keys section: Click Create Access Key.
![]()
Create Access Key:
![]()
The key created:
![]()
C.2 - Configure AWS Console
We have
![]()
Check:
![]()
C.3 - Test Connection
The most easy test is to list files in s3.
![]()
It is running. However, we did not get files back, because the server is new and does not have any files in it. We try another way to test.
Save parameters, test1, test2, test3, into AWS Parameter Store ( see: Remove IIS Log Files (4-1) --- Managing Sensitive Info in AWS)
![]()
The commands successed. That means the configuration is working, the AWS Console links to server successfully. Try retreive the parameter values to verify this.
![]()
We got error as shown. We try to check from AWS server, the parameter store.
![]()
We cannot see anything such like parameters: test1, test2, test3. We added one parameter from server as test, and then tried to retreive the value from AWS Console,
![]()
We still could not.
![]()
We realized that we created the register using region us-west-2, while in our server the setting by default directs to us-east-1 region:
![]()
Switch the server regon to redirect to us-west-2:
![]()
We could see the created parameters from server. Then retreiving from Console:
![]()
We got the results successfully.
C.4 - Corp Sample
For individual company, it might have different AWS configuration, such as the followinig that we should get the Access Keys from the AWS entry page:
![]()
In this page, we can use any of the options to access AWS resources or form the AWS CLI.
![]()
A workable way, choosing PowerShell => Option 1: Set AWS environment variables => Copy
![]()
Set AWS environment variables, and run the AWS command to save a parameter to parameter store, test1, test2, ...
![]()
Retreive the parameter. And also use the command:
aws s3 ls
Note:
The Access Keys probably expire after 24h and have to be refreshed.
References: