Raspberry Pi

How to Install AWS-CLI on Raspberry Pi

AWS-CLI is an integrated tool that offers a constant interface for engaging with all components of Amazon Web Services. It is one of the most effective technologies for automation and cloud computing. It can do a variety of tasks, including managing S3 object storage as well as EC2 compute instances. You can also use it to construct and administer services like Amazon Lambda functions. As a result, having the AWS-CLI installed on a Raspberry Pi can be a great asset for any developer or system administrator.

Users should follow this guide if they wish to install AWS-CLI on Raspberry Pi.

Install AWS-CLI on Raspberry Pi

There are two methods to install AWS-CLI on Raspberry Pi, which are as follows:

Method 1: Through Apt Command

To install AWS-CLI through official Raspberry Pi repository, follow the below-given steps:

Step 1: Ensure that packages installed on the system are updated and this can do through following command:

sudo apt update

Step 2: Once the packages are installed, the AWS-CLI can be installed with the apt package manager through the following command:

sudo apt install awscli

Step 3: Verify the AWS-CLI version with below-mentioned command once the installation is completed:

aws --version

At this stage, you have successfully installed AWS-CLI on the Raspberry Pi system and you can start configuring it.

Method 2: Through Pip

You can also install AWS-CLI through pip command given below:

sudo pip install awscli

How to Configure AWS-CLI from Raspberry Pi

Before using AWS-CLI, you must register an account here. You will get the Access Key ID, Secret Access Key, and AWS Region Name after your account has been setup. While setting AWS-CLI on a Raspberry Pi, this information will be needed. Use “json” as the preferred output format since it is simpler to understand than plain text.

Execute this command on your Raspberry Pi after you have the above information.

aws configure

Write down the required information to complete the ASW-CLI configuration.

How to Test the Connections with AWS-CLI

Try to run any AWS list command to check the CLI connection. You may use the “aws iot list-things” command to get a list of all your IoT devices.

aws iot list-things

If you’ve set up any IoT Things on Amazon, you should see the list; otherwise, a blank json things list will appear if you haven’t created any IoT Things on AWS.

Execute the command that follows on a Raspberry Pi to create a new IoT thing:

aws iot create-thing --thing-name "<ThingName>"

How to Remove AWS-CLI from Raspberry Pi

Use the following command to remove AWS-CLI from Raspberry Pi in case you don’t need it on your system.

sudo apt remove awscli


The AWS-CLI on Raspberry Pi is a powerful tool for accessing and managing AWS services. The setup process is relatively simple, and the features are incredibly useful for automation and other tasks. You can install AWS-CLI either through the Raspberry Pi repository or through pip. After the installation, you can configure AWS on the terminal using the Access keys that must require registering an account on AWS.

About the author

Hiba Shafqat

I am a Computer Science student and a committed technical writer by choice. It is a great pleasure to share my knowledge with the world in which I have academic expertise.