First of all, you need to know there are 2 versions of AWS CLI. In this article we will focus on AWS CLI v1 install as it is the most common and most known version of the AWS CLI.
Prerequisites
AWS CLI v1 relies on Python, and is compatible either with Python 2 or Python 3.
You can check your Python version with the following command line:
$ python --version
if your computer doesn't already have Python, you will first have to install it.
Install from Zip
This is not the most straightforward way to install the AWS CLI, but you can install it from the Zip bundle that is downloadable from S3.
You can install AWS CLI v1 with the following command:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Verify installation
If everything is ok, you should be able to execute the following command and see as a result the version number of the CLI:
$ aws --version
aws-cli/1.17.4 Python/3.7.4 Darwin/18.7.0 botocore/1.13
Install with pip
If you prefer, you can go also with pip to install the CLI. To proceed, you will have to execute this command:
pip3 install awscli --upgrade --user
Then, you should be able also, to get a result by typing the command `aws --version`.
More informations
If you want more informations, you can refer to AWS CLI install page from the official documentation, following this link: