How to install LocalStack on Ubuntu 24.04 LTS

This tutorial teaches you how to install LocalStack on Ubuntu 24.04 LTS in simple steps.

What is LocalStack

LocalStack is an open-source solution used to develop, run, and test cloud applications on your local computer. With a focus on increasing the developer’s productivity, it removes AWS dev account maintenance from the equation. Not only does LocalStack allow the developer to focus their time and effort on what counts, but it also reduces unnecessary spending.

What is LocakStack used for

Developers use LocalStack in their development and testing environments. They run their apps locally with LocalStack before deploying them in the cloud.

Prerequisites

To follow the LocalStack installation steps you need to have Docker already setup on Ubuntu. Follow the steps in this link to learn how to install Docker on Ubuntu 24.04 LTS.

To create cloud resources on LocalStack you need to install the AWS CLI tool. Follow the steps through this link to learn how to install AWS CLI on Ubuntu 24.04 LTS.

Step 1: Update Ubuntu 24.04 LTS

Before installing new software on Ubuntu it’s a good practice to update the repository sources. This guarantees that you install the latest stable version of a package.

To update Ubuntu type:

sudo apt update

Step 2: Download LocalStack CLI on Ubuntu 24.04 LTS

LocalStack CLI allows to run LocalStack from the command line. To download LocalStack CLI on Ubuntu type:

curl --location https://github.com/localstack/localstack-cli/releases/download/v3.8.0/localstack-cli-3.8.0-linux-amd64-onefile.tar.gz --output localstack-cli.tar.gz

The –location option in the CURL tool specifies the URL of the resource to retrieve while –output is used to store the file with a local name.

Step 3: Extract the LocalStack CLI binary

Linux executables are stored within the /usr/local/bin directory. To be able to run LocalStack from the terminal extract the LocalStack CLI binary inside the /usr/local/bin/ directory.

sudo tar -zxvf  localstack-cli.tar.gz -C /usr/local/bin

The options used in the tar command above are explained below.

  • -z stands for the gz compression.
  • -x stands for extraction.
  • -v stands for verbose output, useful for debugging.
  • -f specifies the file to extract from.
  • -C specifies the output directory for the files to be extracted.

Step 4: Run LocalStack CLI on Ubuntu 24.04 LTS

The LocalStack CLI is rich in command line options. To start LocalStack CLI open a terminal and type:

sudo localstack start 

how to install localstack on ubuntu 24.04 lts
LocalStack on Ubuntu 24.04 LTS

The following is the URL to access LocalStack on your browser.

http://localhost:4566/

Final thoughts

Through this tutorial, you learned how to install LocalStack on Ubuntu 24.04 LTS. Now you can practice Amazon Web Services on your local host.

Leave comment

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