install-aws-cli-ubuntu

How to install AWS CLI in Ubuntu

The AWS Command Line Interface (CLI) is a powerful tool that helps you manage AWS services directly from the terminal. Whether you're automating deployments or accessing AWS resources, installing the AWS CLI on Ubuntu is an essential first step. This guide walks you through how you can install AWS CLI in Ubuntu successfully and even the steps to check if the setup was successful.

Step-by-step guide to installing AWS CLI in Ubuntu

Step 1. Update your package manager

Open your terminal and update the system packages. You can do so by typing the following command in the terminal:

sudo apt update

Step 2. Install required packages

You’ll need to unzip and curl to download and install the AWS CLI. If you don’t have it already, you can install it using the following command:

sudo apt install unzip curl -y

Step 3. Download the AWS CLI installer

Now, use the following command to download the installation zip file of AWS CLI:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

Step 4. Unzip the installer

Next, unzip the downloaded installer. You can do it using the following command:

unzip awscliv2.zip

Step 5. Run the install script

Next, move on to installing the AWS CLI using. You can do that using the following command:

sudo ./aws/install

Step 6. Verify the installation

Once it’s installed, you need to check if AWS CLI was installed successfully. You can use the following command for it:

aws --version

If the setup was successful, you should see an output similar to this:

aws-cli/2.x.x Python/X.X.X Linux/x86_64 source

Else, you’ll get an error message.

Pump saves ~60% on CLOUD *for free*

FAQ

What version of AWS CLI is installed by default?

The installation downloads the latest stable version of AWS CLI available.

Can I install AWS CLI via apt?

No, AWS CLI v2, which is currently the latest version, is not available in the default apt repository. You must use the official installer to install it.

How do I uninstall AWS CLI from Ubuntu?

If you want to uninstall AWS CLI from Ubuntu, you can use the following command: sudo ./aws/uninstall

Where is AWS CLI installed?

The AWS CLI is installed by default in: /usr/local/bin/aws.

Get started with PUMP for free

No contracts, no credit card needed to sign up

Get started with PUMP for free

No contracts, no credit card needed to sign up

Get started with PUMP for free

No contracts, no credit card needed to sign up

1390 Market Street, San Francisco, CA 94102

Made with

in San Francisco, CA

© All rights reserved. Pump Billing, Inc.