AWS Command Line Interface (AWS CLI) has two versions. In this guide, we will install AWS CLI v2 on both Windows and Ubuntu, as this version is simpler and more fully supported than AWS CLI v1.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
sudo ln -s /folder/installed/aws-cli/aws /usr/local/bin/aws
sudo ln -s /folder/installed/aws-cli/aws_completer /usr/local/bin/aws_completer


aws --version

Use the aws configure command to set up AWS CLI. This command will prompt you to enter important information:
aws configure
Enter the Access key ID and Secret Access Key of aws-cli-user, keep the remaining values as default:
AWS Access Key ID [None]: *aws-cli-user_Access Key ID*
AWS Secret Access Key [None]: *aws-cli-user_Secret Access Key*
Default region name [None]: *ap-southeast-1*
Default output format [None]: *json*

This configuration is saved in the credentials file under the default profile. The default profile will be used by AWS CLI if no other profile is specified.
To create another profile, for example devops, use the following command, enter the Access Key ID and Secret Access Key of the devops user, keep the remaining values as default:
aws configure --profile devops

The profile contains Access Key ID and Secret Access Key to sign requests sent to AWS.
aws configure

cd ~/.aws/
ls
cat config

aws configure get region --profile devops

aws configure list

aws configure list-profiles

You can edit or add profiles by directly updating the config and credentials files with a text editor on your operating system.