The AWS Command Line Interface (CLI) is a powerful tool that enables you to manage your AWS services directly from the terminal. Whether you’re automating workflows or managing resources on the go, the AWS CLI can streamline your operations. In this guide, we’ll walk you through the steps to install the AWS CLI on Ubuntu 24.04 Noble Numbat.
Prerequisites
Before we start, ensure you have the following:
- A fresh installation of Ubuntu 24.04 Noble Numbat.
- A user account with sudo privileges.
- Basic knowledge of using the terminal.
Step 1: Update Your System
First, make sure your system is up-to-date by running the following commands:
Step 2: Install Dependencies
The AWS CLI requires Python and pip
(Python’s package installer). Install these dependencies if they are not already installed:
Step 3: Install the AWS CLI
With pip
installed, you can now install the AWS CLI using the following command:
The --upgrade
option ensures that any existing versions of AWS CLI are upgraded to the latest version, and the --user
option installs the AWS CLI for your user without requiring sudo.
Step 4: Add AWS CLI to Your PATH
To ensure that the AWS CLI can be accessed from any terminal session, you need to add it to your PATH. Add the following line to your ~/.bashrc
file:
Then, reload your ~/.bashrc
file to apply the changes:
Step 5: Verify the Installation
To verify that the AWS CLI is installed correctly, check its version by running:
You should see output similar to:
The exact version numbers may vary, but as long as you see similar output, the installation was successful.
Step 6: Configure the AWS CLI
Before you can start using the AWS CLI, you need to configure it with your AWS credentials. Run the following command to start the configuration process:
You’ll be prompted to enter your AWS Access Key ID, Secret Access Key, region, and output format:
Replace YOUR_ACCESS_KEY_ID
, YOUR_SECRET_ACCESS_KEY
, and YOUR_PREFERRED_REGION
with your actual AWS credentials and preferred region. For the output format, you can choose json
, text
, or table
.
Step 7: Test Your Configuration
To ensure your configuration is working, you can run a simple AWS CLI command, such as listing your S3 buckets:
If everything is configured correctly, you should see a list of your S3 buckets.
Conclusion
Congratulations! You have successfully installed and configured the AWS CLI on Ubuntu 24.04 Noble Numbat. With the AWS CLI, you can now manage your AWS services efficiently directly from your terminal. Be sure to refer to the AWS CLI documentation for more detailed information and advanced usage.
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.