X
Collapse
-
How to Install AWS CLI on Ubuntu 24.04
AWS offers numerous services for anyone to use. However, when you want an easy and controlled way of controlling all your AWS services, you must install an AWS CLI (command-line interface). The AWS CLI gives you access to the AWS API, allowing you to manage all the services depending on the task you are handling or want to automate.
You can install the AWS CLI on Ubuntu 24.04, and there are two approaches you can use depending on your preference. You can install it as a snap package or a Python module inside a Python virtual environment. Let’s discuss each option.
Method 1: Install AWS CLI Via Snap
Ubuntu supports AWS CLI, and you can access it as a snap package from App Center via GUI or using the snap command. Installing AWS CLI as a snap will install all the dependency packages it requires without installing them separately.
If you find this approach convenient, execute the below command to install AWS CLI.
$ sudo snap install aws-cli --classic
AWS CLI will be downloaded and installed on your system. With this option, the AWS CLI is accessible system-wide and not just in a virtual environment, as in the second method.
Once you install AWS CLI, check the installed version to ascertain the package has been installed successfully.
$ aws --version
We’ve installed AWS CLI version 2.15.38.
The next step is to set up the AWS CLI by connecting it with your AWS account to allow you to take control of your AWS services. Run the configure command below.
$ aws configure
Provide your credentials to complete the setup.
Method 2: Install AWS CLI as a Python Module
You can also install AWS CLI on Ubuntu 24.04 as a Python module. This method requires creating a virtual environment and using pip to install AWS CLI. A virtual environment is a secluded way of using packages. Instead of making AWS CLI accessible system-wide, you can limit it to only being accessible inside the created virtual environment.
Besides, if you don’t have sudo privileges on the system, provided you have a virtual environment, you will manage to install AWS CLI. Follow the steps below.
Step 1: Install Python3 PIP and Venv
To create a virtual environment, we must have Venv installed. Execute the below command to install it.
$ sudo apt install Python3-venv
You also need PIP to help with installing Python modules. Therefore, install PIP using the following command.
$ sudo apt install python3-pip
Step 2: Create a Virtual Environment
With Venv, we can create a secluded environment in which to install AWS CLI without requiring sudo privileges. A virtual environment is recommended when working with Python modules, as it doesn’t interfere with APT-installed packages. Besides, if things go sideways, it doesn’t affect your system. We are using Python 3 for this case.
Here’s how you create a virtual environment and activate it.
$ python3 -m venv .venv
$ source .venv/bin/activate
We’ve named the virtual environment “venv,” but you can use any preferred name. Again, we’ve created the directory in our current location, but you can specify a different path.
Step 3: Install AWS CLI
Inside the virtual environment, running the following command will download and install AWS CLI.
$ pip3 install awscli
Ensure the download completes successfully. You will get an output similar to the one below.
You can check the installed version.
$ aws --version
With AWS CLI installed, configure it to start managing your AWS services. Once you are done using it or want to exit the virtual environment, deactivate it.
Conclusion
AWS CLI is a preferred way of managing your AWS services. On Ubuntu 24.04, you can install it as a snap package or in a Python virtual environment using PIP. This post discussed each method, giving examples to create a detailed and straightforward guide for anyone to follow along.
More...Tags: None
Posting comments is disabled.
Categories
Collapse
Article Tags
Collapse
There are no tags yet.
Latest Articles
Collapse
-
by Kasimba
by George Whittaker
Introduction
Quantum computing, a revolutionary paradigm, promises to solve problems that are computationally infeasible for classical systems. By leveraging the peculiar principles of quantum mechanics—superposition, entanglement, and quantum interference—quantum computing has emerged as a transformative force across industries. From cryptography and drug discovery to optimization and...-
Channel: Articles
Today, 06:22 PM -
-
by Kasimba
by George Whittaker
Introduction
Qualitative data analysis (QDA) is a cornerstone of research across various fields, from social sciences to marketing. It involves uncovering patterns, themes, and meanings within non-numerical data such as interviews, focus groups, and textual narratives. In this era of digital tools, MAXQDA stands out as a premier software solution for QDA, empowering researchers to organize...-
Channel: Articles
11-21-2024, 11:31 PM -
-
by Kasimba
by german.suarez
Introduction
In today’s fast-paced digital landscape, ensuring the availability and performance of applications is paramount. Modern infrastructures require robust solutions to distribute traffic efficiently and maintain service availability even in the face of server failures. Enter HAProxy, the de facto standard for high-performance load balancing and failover.
This article...-
Channel: Articles
11-21-2024, 03:00 PM -
-
by KasimbaArch Linux hasn't had a license for any package sources (such as PKGBUILD files) in the past, which is potentially problematic. Providing a license will preempt that uncertainty.
In RFC 40 we agreed to change all package sources to be licensed under the very liberal 0BSD license. This change will not limit what you can do with package sources. Check out the RFC for more on the rationale and prior discussion.
Before we make this change, we will provide contributors with...-
Channel: Articles
11-19-2024, 09:21 AM -
-
by Kasimba
by George Whittaker
Introduction
In the world of cybersecurity and software development, binary analysis holds a unique place. It is the art of examining compiled programs to understand their functionality, identify vulnerabilities, or debug issues—without access to the original source code. For Linux, which dominates servers, embedded systems, and even personal computing, the skill of binary analysis is...-
Channel: Articles
11-18-2024, 07:10 PM -
-
by KasimbaDebian and Ubuntu are two popular Linux distributions. In this deep dive we will guide you on the key differences between them from perspective of both corporate enterprise and personal productivity or pleasure usage. After reading this blog post you should be in a better position to decide to select Ubuntu or Debian.
Stewardship, Licensing, Community and Cost
Where as Debian is 100% fully committed to free software as defined by the Debian Free Software Guidelines, Ubuntu is created...-
Channel: Articles
11-17-2024, 08:30 PM -