Installing AWS Command Line Interface (CLI) on Debian

The AWS Command Line Interface (CLI) provides a powerful and flexible way to interact with Amazon Web Services (AWS) from the command line. It allows users to manage AWS resources, automate tasks, and access AWS services directly from their terminal. In this blog, we will guide you through the process of installing the AWS CLI on a Debian-based Linux distribution, such as Debian itself or Ubuntu.


Prerequisites:

Before proceeding with the installation, make sure you have the following prerequisites in place:

1. A Debian-based Linux distribution (e.g., Debian, Ubuntu).

2. A terminal or shell with administrative privileges (sudo access).

3. Basic familiarity with the Linux command line.

Step 1: Update System Packages

To ensure that your system has the latest package information, update the package lists using the following command:

sudo apt update

Step 2: Install Python

The AWS CLI requires Python to be installed on your system. Most modern Debian-based distributions come with Python pre-installed. To check if Python is installed, use the following command:

python3 --version

If Python is not installed, you can install it using the package manager:

sudo apt install python3

Step 3: Install Pip (Python Package Manager)

Pip is a package manager for Python that allows you to easily install Python packages, including the AWS CLI. To install Pip, run the following command:

sudo apt install python3-pip

Step 4: Install AWS CLI Using Pip

With Pip installed, you can now install the AWS CLI. Run the following command:

sudo pip3 install awscli

Step 5: Verify Installation

Once the installation is complete, you can verify the AWS CLI installation by checking its version:

aws --version

This should display the version number of the installed AWS CLI.

Step 6: Configure AWS CLI

Before you can start using the AWS CLI, you need to configure it with your AWS credentials. Run the following command and follow the prompts:

aws configure

You will be prompted to enter your AWS Access Key ID, AWS Secret Access Key, default region name, and default output format.


Conclusion:

Congratulations! You have successfully installed the AWS Command Line Interface on your Debian-based Linux distribution. With the AWS CLI, you can now manage your AWS resources, automate tasks, and interact with AWS services right from your terminal. Remember to keep your AWS credentials safe and secure and regularly update your AWS CLI installation to ensure you have access to the latest features and improvements.