How To Install AWS CLI On Ubuntu

Ubuntu Sign in to your XDA account If you dabble in web development or complex DevOps and happen to be using a Linux distribution like Ubuntu, you’ll probably need to … Read more

Taylor Bell

Taylor Bell

Published on Jul 12, 2024

How To Install AWS CLI On Ubuntu
Ubuntu

4

4

Sign in to your XDA account

Ubuntu popup screen on a desktop

If you dabble in web development or complex DevOps and happen to be using a Linux distribution like Ubuntu, you’ll probably need to use the Amazon Web Services (AWS) Command Line Interface (CLI) at one point. You’re not going to get this by default on Ubuntu, so you’ll need to install it manually through the terminal, allowing you to interact with AWS services using complex commands and text. This guide will show you how to get up and running in no time.

How to install AWS CLI on Ubuntu

The AWS CLI is available through the Ubuntu repository. This means you can grab it using a simple command in the terminal. This might not be the latest version, but it still will do the trick if you’re not comfortable with the advanced method we’ll get into later.

  1. Open the terminal (Ctrl + Alt + T).
  2. Install the AWS CLI:
    sudo apt install awscli
    A screenshot of the basic sudo apt install command needed to install AWS CLI on Ubuntu as seen in the terminal

  3. Enter your password.
  4. Confirm you want to install the app with Y.

Once you confirm, the installation process will begin. It could take a while, depending on your internet speed. You can double-check that AWS CLI is installed by running the command aws –version.

How to install the most current AWS CLI version on Ubuntu

AWS CLI is always updated, but the version you install using the terminal might not be the correct one. If you want the latest version that Amazon offers, you’ll have to go through a few extra steps by trying out the commands below.

  1. Install curl unzip:
    sudo apt install curl unzip
    A screenshot of the command in the intial step needed to install curl Unzip on Ubuntu

  2. Enter your password and confirm the installation with Y.
  3. Download the latest version of the AWS CLI from Amazon’s servers:
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    A screenshot of the command needed to fetch the .ZIP file of the AWS CLI on Ubuntu in the terminal

  4. Unzip the downloaded files:
    unzip awscliv2.zip
    A screenshot of the proccess needed to unzip the AWS CLI in Ubuntu

  5. Install AWS CLI:
    sudo ./aws/install

Just like before, you can confirm which version of AWS CLI you’re running on your Ubuntu machine with the command aws –version.

Additional steps for later

Once you finish installing AWS CLI, there are a couple more suggested steps. You will need to log in to your Amazon Web Services account to use and create your access keys, then configure it through the terminal with aws configure and enter in your details. Once complete, you can start your coding journey! And don’t forget, there are other great Linux apps that you can use too to help you along as you use Ubuntu.

Partager cet article

Inscrivez-vous à notre newsletter