AWS

How to Install AWS CLI via pip?

pip is a standard package used to install software or applications written in the Python scripting language. AWS CLI is utilized to manage Amazon’s cloud resources using simple commands on the Terminal. The user can create and manage AWS resources without visiting the management console.

This post will demonstrate the method to install the AWS CLI using pip.

How to Install AWS CLI via pip?

To install Amazon Web Service (AWS) Command Line Interface (CLI) using pip, simply verify whether the pip is installed or not with the help of the following command:

pip --version

 
Running the above command will display the installed version of pip to validate that the pip has been installed successfully:


Sidenote: To understand the process of installing the pip, click here.

Once the pip is installed, simply use the given command to install AWS CLI using pip3:

pip install awscli

 
Running the above command will display the following output:


Now, verify the AWS CLI installation:

aws --version

 
Running the above command will display the installed version of AWS CLI:


To locate the path where the AWS CLI has been installed, simply run the following command:

where aws

 
Running the above command will provide the path of the installed AWS CLI:


Once the AWS CLI is installed, configure the security credentials to run AWS CLI commands:

aws configure

 
Running the above command will prompt the user to enter the Access and Secret key which can be obtained from “IAM” user. After that, select the region in which the AWS resources will be used and provide the output format. To learn the complete process of configuring AWS CLI, simply click here:


Simply use the following command to check the number of S3 buckets created:

aws s3 ls

 
Running the above command will display the list of S3 buckets:


That was all about installing the AWS CLI using pip.

Conclusion

To install the AWS CLI using pip, simply verify whether pip is installed on the system or not. Run the “install aws” command with the “pip” keyword to install the AWS CLI to control AWS resources with simple commands. Once the AWS CLI is installed on the system, verify the “aws version” command. This post was all about the installation of the AWS CLI via pip.

About the author

Talha Mahmood

As a technical author, I am eager to learn about writing and technology. I have a degree in computer science which gives me a deep understanding of technical concepts and the ability to communicate them to a variety of audiences effectively.