How to Install LocalStack on macOS

LocalStack is a platform that provides a simple way to develop and test cloud applications. It can help you to do your development work even without connecting to any cloud services. LocalStack supports the most popular services like Amazon Web Services (AWS), Azure, and Google Cloud Platform (GCP) and can be used to locally test serverless functions, APIs, and other cloud applications.

In this tutorial, we will guide you through the installation process of Localstack on macOS.

Prerequisites

Before we start, please ensure you have the following:

Steps

Now follow the steps below to install LocalStack:

  1. Open a terminal and use the following command to install LocalStack:

    brew install localstack
    
  2. Once the installation is complete, start the LocalStack server using the following command:

    localstack start
    

    This command will start the LocalStack server with default settings.

    Localstack Start

  3. Verify LocalStack status by visiting localhost:4566/health in your web browser or use the following command in your terminal:

    aws --endpoint-url=http://localhost:4566 sts get-caller-identity
    

    If LocalStack is running successfully, you should see the following response:

    {
     "Account": "123456789012",
     "UserId": "XXXXXXXXXXXXX",
     "Arn": "arn:aws:sts::123456789012:XXXXXXXXXXXXX"
    }
    

    This will authenticate your AWS CLI configuration (as if you are using the real AWS). However, no communication with real AWS is happening at this point, everything is handled locally by LocalStack.

  4. To stop the LocalStack server, use the following command:

    localstack stop
    

    This command will stop the running LocalStack server.

  5. (Optional) Use the following command to allow the LocalStack server to be run at system startup:

    brew services start localstack
    

    This will start LocalStack as a service and will automatically run at system startup.

Conclusion

In this tutorial, we have shown you how to install LocalStack on macOS. As a developer, you now have a tool that you can use to test your applications without the need to connect to any cloud service. You can now create and test your applications that rely on cloud services such as AWS, Azure and GCP.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!