The Amazon Web Services command line tool (AWS CLI) gives users the ability to control and manage AWS services through command line scripts. This makes everything very easy to manage with a single tool, and it can be installed on any Linux distribution.
The tool requires Python in order to run, so that’s really the only prerequisite. In this guide, we’ll go over the step by step instructions to install AWS CLI on Linux. Follow along with the steps below to get it set up on your own system.
In this tutorial you will learn:
- How to install pip on major Linux distros
- How to install AWS CLI through pip
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Any Linux distro |
Software | Python, pip, AWS CLI |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Install pip on major Linux distros
pip is the package manager for the Python coding language. It can be installed on a Linux system and then used on the command line to download and install Python packages and their requisite dependencies. In this case, we need to have it installed on our system since it will then be used to install the AWS CLI Pyhton package.
If you already have Python installed, there’s a good chance you have pip as well. If not, it’s easy enough to install with these commands:
To install pip on Ubuntu, Debian, and Linux Mint:
$ sudo apt install python3-pip
To install pip on CentOS, AlmaLinux, Fedora, and Red Hat
$ sudo dnf install python3
To install pip on Arch Linux and Manjaro:
$ sudo pacman -S python-pip
To install pip on OpenSUSE:
$ sudo zypper install python3-pip
Once pip is installed, you can begin using it to install or remove Python packages from your system, including AWS CLI. Check the section below to see how to do that.
Install AWS CLI
- Is pip installed on your system? Use the following command to verify that it is.
$ pip3 -V
- Now, to install AWS CLI, issue the following command to install it through the pip Python manager.
$ pip3 install awscli
- As a last step we can check the awscli version:
$ aws --version
- To configure your awscli tool enter the following Linux commands:
$ aws configure
Closing Thoughts
In this guide, we saw how to install the AWS CLI tool on any Linux distribution, allowing for easy management of all AWS services through a command line interface. Since the tool relies on Python, the prerequisites are quite easy to install, and AWS CLI itself can be installed through the pip Pyhton manager.