How to Install & Configure AWS CLI on Ubuntu

This post should help guide you through the process of installing and configuring AWS CLI (version 1) on Ubuntu (20.04).

The following areas are covered in this demo:
Updating Local Packages
Installing AWS CLI on Ubuntu
Checking Installed AWS CLI Version
Configuring AWS Profile
Running AWS CLI Commands

Updating Local Packages

To start, update your local packages by running the following command:

# update local packages ubuntu
sudo apt-get update

Installing AWS CLI on Ubuntu

You can install AWS CLI on Ubuntu by running the following command:

# install awscli ubuntu
sudo apt-get install awscli

Checking Installed AWS CLI Version

After the installation is complete, check the version of AWS CLI that was installed by running:

# check version of awscli installed
aws --version

Configuring Your AWS Profile

Once you have confirmed the version, you can run aws configure to set up your AWS profile. Your Access Key ID and Secret Access Key can be found and recreated in the AWS IAM Console, which I have covered in my previous post on installing and configuring AWS CLI on Windows.

# configure aws profile
aws configure

For reference, here are the output config files – this is an area that gets touched a lot.

Running AWS CLI Commands

Once you have completed the configuration, you can run AWS CLI commands like the following example, which lists all the buckets in your AWS account that begin with the pw-* prefix:

Note that this is not the only way to install AWS CLI on Ubuntu, and this guide covers version 1 of AWS CLI.

Comments

One response to “How to Install & Configure AWS CLI on Ubuntu”

  1. […] First of all, you will need to be authenticated to your AWS Account and have AWS CLI installed. I cover this in previous blog posts:# How to Install and Configure AWS CLI on Windows# How to Install and Configure AWS CLI on Ubuntu […]

Leave a Reply

Your email address will not be published. Required fields are marked *