The AWS CLI is a command line tool for controlling and managing your AWS services. There are several ways to install the AWS CLI on Linux. You can install it with the supplied installer regardless of whether you have superuser privileges on your system.
Read on to learn more about the AWS CLI and how to install it on Linux.
AWS CLI requirements
The AWS CLI installation requires Python on your Linux computer. Your system should have Python version 3.6 or higher in order to install AWS. You can install Python by downloading the archive from the official website. But first you need to get some dependencies with APT. Issue the following commands in sequence to download all the required dependencies:
sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Install Python on Ubuntu
Once the system has finished installing the dependencies, load the Python archive with the. down wget Command.
Extract the package contents with the tar Command.
tar xvf Python-3.6.0.tar.xz
Use the cd command to change your current working directory to where the package was extracted. When done, configure and install the compilation.
cd Python-3.6.0 /
If you encounter an error message, enter the following command:
By using the do altinstall Command instead to install, you can skip creating the symbolic link. This step will take a little longer, so please be patient as it proceeds.
sudo do altinstall
Install the AWS CLI using the bundled installer
The bundled installer comes with all of its inherent dependencies, making it perfect for offline installation. First, download the AWS CLI Version 1 installer onto your computer. You can use one of the following methods to download the installation package:
Download the installer from the terminal using the curl command:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Alternatively, you can also download the bundled installer by going to the official website.
Download: AWS CLI Version 1 Bundled Installer
After the zip file has been downloaded, extract the package using the built-in package manager on your Linux computer. You can also unzip the downloaded package from the terminal by running the following command:
Once the unpacking process is complete, run the installation command. Specify the installation path and the location of the symbolic link to the installer by typing the -I and -B Flags.
sudo ./awscli-bundle/install -i / usr / local / aws -b / usr / local / bin / aws
The system now installs AWC CLI version 1.
After the installation is complete, verify the installation by entering the following commands:
If the installation was successful, the system displays the following output:
aws-cli / 1.15.58 Python / 3.5.2 Linux / 5.11.0-25-generic botocare / 1.10.57
How to uninstall the AWS CLI version 1
Removing the AWS CLI from Ubuntu is a breeze. All you have to do is delete the installation directory and the symlinks created during installation.
sudo rm -rf / usr / local / aws
sudo rm / usr / local / bin / aws
Manage AWS services from the terminal
The AWS CLI is a handy tool to easily manage your AWS services. You can use the bundled installer to install the AWS CLI. The included installer is great for offline installations, but it involves more steps than the normal installation process.
You can also use PIP to install the AWS CLI on your Linux computer in case you're a fan of quick installs. In either case, you can install / uninstall the AWS CLI as per your needs.
Cloud computing services are the solution to the growing server requirements of many companies. This is the main reason the cloud development trend has skyrocketed. Get on the train by learning the ins and outs of Amazon Web Services today.
Become an AWS Expert and be hired as a Top Expert
Become a certified AWS expert with 40 hours of content on technical fundamentals, architectural principles and cloud computing
About the author
(28 published articles)
Wini is a Delhi based writer with 2 years of writing experience. While writing, she was associated with digital marketing agencies and technical firms. She has written content on programming languages, cloud technology, AWS, machine learning, and much more. In her free time, she enjoys painting, spending time with her family and traveling to the mountains whenever possible.
By Wini Bhalla
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive offers!
Click here to subscribe