The AWS Command Line Interface (CLI) is a free tool provided by the Amazon web service, a cloud computing platform. It allows users to interact and manage the various AWS services directly from their system’s command terminal. Well, if you are a Ubuntu Linux user then can install AWS CLI directly using the APT package manager, however, for other distro users who want to get the latest AWSL CLI version but using the PIP, this article is for them. PIP is a popular package manager developed to install libraries and other dependencies for a Python project.
In this article, we see a step-by-step process of installing the AWS CLI on Linux using pip.
Step 1: Update your Linux
To follow this tutorial you must be on a Linux system like Ubuntu, CentOS, Alamlinux Amazon Linux, or any other. So, according to your Linux system run the system update command first.
If you are on Debian, Ubuntu, or any similar Linux then the command is:
sudo apt update
Whereas, RedHat based systems including Amazon Linux users can use-
sudo yum update
Step 2: Install Python and PIP
Most of the modern Linux systems will already have Python3 pre-installed, however, if not then you have to configure it first, along with its package manager which is PIP.
- For Debian and Ubuntu-based systems
sudo apt install python3 python3-pip
- For Redhat, CentOS, AlmaLinux, Rocky Linux, and similar Linux
sudo yum install python3 python3-pip
Step 3: Install AWS CLI on Linux using PIP
Once the PIP is on your Linux system installing AWS CLI using it is quite simple, just follow the given command and in a few seconds, you will have the latest version of AWCLI on your system.
pip3 install awscli --user
Step 4: Confirm AWC-CLI version
As you are done with the installation, let’s confirm whether our Linux system has the AWS CLI or not, and if it is then what version.
The above command will print the version details in your terminal…
Step 5: Configuration
To connect and manage the AWS service you need to configure your cloud account credential in your terminal using the AWS CLI tool. Just type the given command and enter your AWS Access Key ID, AWS Secret Access Key, and other required details.
Step 6: Testing the AWS CLI
After successfully authenticating and connecting your AWS account to check AWS CLI is working you run a simple command such as the one given below to see the list of all your Amazon S3 buckets.
aws s3 ls
If it working then you will see the list.
This was the quick tutorial on installing the AWS CLI on Linux using pip which is not a difficult process and if you already have the PIP installed on your system then it is just a single command process. Once you have this CLI tool it becomes easy to use the local command terminal to interact with various AWS services using the internet.