Read on to know more about AWS CLI and how to install it on Linux.

Prerequisites for AWS CLI

AWS CLI installation requires Python on your Linux machine. Your system should have Python version 3.6 or above for installing AWS. You can install Python by downloading the archive from the official website. But first, you’ll have to get some dependencies using APT. Issue the following commands one by one to download all the necessary dependencies:

Install Python on Ubuntu

As soon as the system finishes installing the dependencies, download the Python archive using the wget command.

Extract the package contents with the tar command.

Change your current working directory to where the package was extracted using the cd command. Post completion, configure the compilation and install.

In case you encounter an error message, issue the following command:

By using the make altinstall command instead of make install, you can skip the creation of the symbolic link. This step takes a little longer to run, so please be patient during the execution.

Install AWS CLI Using the Bundled Installer

The bundled installer comes with all its inherent dependencies, making it perfect for offline installation. First, download the AWS CLI version 1 installer on your machine. You can use any of the following methods to download the installer bundle:

Download the installer through the terminal using the curl command:

Alternatively, you can also download the bundled installer by heading over to the official website.

Download: AWS CLI Version 1 Bundled Installer

Once the zip file is downloaded, extract the package using the built-in package manager on your Linux machine. You can also unzip the downloaded package from the terminal by issuing the following command:

As soon as the unzipping procedure completes, run the installation command. Specify the installation path and symbolic link location to the installer using the -i and -b flags.

The system will now install AWC CLI version 1.

After the installation is complete, verify the installation by typing the following commands:

The system will display the following output if the installation was successful:

How to Uninstall AWS CLI Version 1

Removing AWS CLI from Ubuntu is a cakewalk. All you have to do is delete the installation directory and the symlinks created during installation.

Managing AWS Services From the Terminal

The AWS CLI is a handy tool for easily managing your AWS services. You can use the bundled installer to install AWS CLI. The bundled installer is great for offline installations but it involves more steps than the normal installation procedure.

You can also use PIP for installing AWS CLI on your Linux machine, in case you are a fan of quick installations. Either way, feel free to install/uninstall AWS CLI as per your requirements.