Installing the AWS Command Line Interface on Linux
The Amazon Web Services (AWS) Command Line Interface (CLI) is an open source tool that enables you to interact with AWS services using commands in your command-line shell. In this tutorial, we’ll explain how to install the AWS CLI on Linux.
Prerequisites
Before you can install the AWS CLI on your Linux machine, there are some prerequisites that need to be met:
- A valid AWS account with administrator access.
- A machine or VM running a supported version of Linux (see AWS documentation for details).
- At least 5GB of free disk space.
recommended reading
Installing the AWS CLI
Once you have the prerequisites in place, you can begin the installation process. Here’s a step-by-step guide:
To install the AWS CLI on Linux, follow these steps:
- First, check if you have Python installed on your system. Open a terminal and run the following command:
python3 --version
If Python is not installed, you can install it by running:
sudo apt-get update
sudo apt-get install python3
- Next, install pip, the Python package manager. Run the following command:
sudo apt-get install python3-pip
- With pip, you can now install the AWS CLI. Run the following command:
pip3 install awscli
- To verify that the AWS CLI has been installed correctly, run the following command:
aws --version
recommended reading
- To use the AWS CLI, you need to configure your AWS access keys. Run the following command:
aws configure
This will prompt you for your AWS access key and secret key, as well as the default region and output format.
Verifying the Installation
The last step is to verify that the installation was successful. To do this, run the following command: aws --version
If the installation was successful, you should see output similar to this:
aws-cli/1.11.68 Python/3.5.2 Linux/4.4.0-93-generic botocore/1.5.45
Congratulations, you have now successfully installed the AWS CLI on your Linux machine!