How to Install & Configure AWS CLI on Ubuntu

ℹ️Update, August 2026: Ubuntu 20.04 LTS reached the end of its standard support in 2025. The steps below work the same on current releases, just use a supported version like 24.04 (the AWS CLI v2 installer below works unchanged).
🐧Part of the WSL Complete Guide, every Windows Subsystem for Linux post on this site, organised by task.

This guide will walk you through the steps to install and configure AWS CLI version 1 on Ubuntu (20.04).

Topics Covered:
1. Updating Local Packages
2. Installing AWS CLI on Ubuntu
3. Checking Installed AWS CLI Version
4. Configuring AWS Profile
5. Running AWS CLI Commands

1. Updating Local Packages

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

# update local packages ubuntu
sudo apt-get update

2. Installing AWS CLI on Ubuntu

To install AWS CLI on your Ubuntu machine, run the following command:

# install awscli ubuntu
sudo apt-get install awscli
Installing the AWS CLI on Ubuntu with apt-get install awscli

3. Checking Installed AWS CLI Version

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

# check version of awscli installed
aws --version
aws --version

4. Configuring Your AWS Profile

Once the installation is confirmed, set up your AWS profile by running the aws configure command as shown below.

You will need your AWS Access Key ID and Secret Access Key, which you can retrieve or create in the AWS IAM Console.

# configure aws profile
aws configure
aws configure

For reference, here are the output config files:

aws credentials config

5. Running AWS CLI Commands

Once your profile is set up, you can run AWS CLI commands. For example, the following command lists all S3 buckets in your AWS account that begin with the “pw-” prefix:

aws s3api list-buckets

Hope this was useful for you!


Related

If SQL Server is part of your day job, my current work lives over at sqldba.blog: production DBA scripts, an error library and the SSMS guide.


Comments

Leave a Reply

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

Looking for SQL Server?

This site started as a SQL Server blog in 2017 and the archive is still here. The new SQL Server writing, and all the scripts, moved to a site of their own.

sqldba.blogScripts, error library, wait types, SSMS
Browse by topic