Matomo Analytics

The AWS CLI (Command Line Interface) is a unified tool to manage your Amazon Web Services directly from your terminal. It provides a consistent interface for interacting with all parts of AWS, enabling automation through scripts and easing the management of resources.

Installation Steps:

Step 1: Update Your System

Start by updating your system's package database with the following commands:

sudo apt-get update -y
sudo apt-get upgrade -y

Step 2: Install Python

AWS CLI is a Python application, and AWS CLI version 2 requires Python 3.6 or later. Install Python and its package manager pip:

sudo apt-get install python3 python3-pip -y

Confirm that Python is installed and that it's the correct version:

python3 --version

Step 3: Install the AWS CLI

Now you can install the AWS CLI using pip:

pip3 install awscli --upgrade --user

Step 4: Add the AWS CLI Executable to Your Command Line Path

Add the directory containing the AWS CLI program to your PATH environment variable. The location of the AWS CLI installation is ~/.local/bin.

export PATH=~/.local/bin:$PATH

To ensure the PATH persists for future sessions, append the export command to the end of the ~/.bashrc or ~/.bash_profile file.

echo 'export PATH=~/.local/bin:$PATH' >> ~/.bashrc

Load the updated profile into your current environment:

source ~/.bashrc

Step 5: Verify the AWS CLI Installation

Verify that AWS CLI is installed correctly:

aws --version

You should see the version of your AWS CLI if the installation was successful. Now, your AWS CLI is installed and ready for use. To fully utilize it, remember to configure it with your AWS credentials.

18 July 2023 (last updated 1 year ago)

1661 views

Written by Dennis

Dennis brings over 6 years of hands-on experience in server management, specializing in optimizing web services for scalability and security.

Back to Server


Start free trial