Loading episodes…
0:00 0:00

Run AWS on Your Laptop with LocalStack and Docker

00:00
BACK TO HOME

Run AWS on Your Laptop with LocalStack and Docker

10xTeam January 02, 2026 5 min read

What if you could run AWS directly on your laptop? Not a simulation. Not a collection of fake configuration files. I’m talking about actual, functional AWS services.

This is precisely what LocalStack offers. It’s a powerful cloud emulator that runs core AWS services locally within a Docker container. Imagine having S3, Lambda, DynamoDB, SQS, and API Gateway all running on your machine, completely offline.

The Pain of Cloud-Only Development

Let’s be honest: developing directly against a live AWS environment can be a frustrating experience. The feedback loop is painfully slow. Your CI/CD pipeline takes an eternity to run. You find yourself hesitant to experiment, terrified of breaking a shared development environment that your entire team depends on.

And then there’s the cost. Every experiment, every test, every deployment comes with the potential for a surprise cloud bill. We all love those, right?

Enter LocalStack: AWS Without the Anxiety

LocalStack provides a solution to these problems. It gives you instant feedback and a robust environment for local infrastructure testing. You can break things, tear them down, and start over without fearing the consequences. Better yet, you don’t need an active AWS account or even an internet connection to get started. It’s the power of AWS without the anxiety.

However, it’s crucial to understand what LocalStack is and what it isn’t. This tool does not replace AWS. It complements it by providing a powerful local sandbox for development and testing.

Getting Started with LocalStack

Spinning up LocalStack is remarkably simple. If you’re on a Mac, you can install it using Homebrew.

# Install LocalStack via Homebrew
brew install localstack

Once installed, you can launch it with a single command in your terminal.

# This command starts the LocalStack Docker container
localstack start

This command fires up a single Docker container that houses all the emulated services. Once it’s running, your laptop exposes an AWS-compatible API endpoint. This is the key to the entire workflow.

Pointing Your Tools to LocalStack

You continue to use the standard AWS CLI and SDKs. The commands, syntax, and workflows remain identical. The only difference is that you point your tools at the local endpoint instead of the real AWS.

For example, you can configure a new AWS CLI profile specifically for LocalStack.

# Configure a profile named 'local' to point to your LocalStack instance
aws configure --profile local
AWS Access Key ID [None]: test
AWS Secret Access Key [None]: test
Default region name [None]: us-east-1
Default output format [None]: json

From there, you can build and deploy your applications. For instance, a deployment script might create an S3 bucket, set your function parameters, and push out a static site, all within the local environment. The script would output local URLs for you to access.

I tested this with a simple Git repository cloned from the official documentation. After deploying, I could open the local URL in my browser, upload a file, and see it process correctly. It all worked flawlessly, with zero cloud resources involved.

Beyond the Demo: Real Infrastructure Integration

This is more than just a cool demo. LocalStack fits directly into real-world infrastructure workflows. Whether you use Terraform, AWS CDK, or the Serverless Framework, you can point your stack to LocalStack instead of AWS.

This change is often as simple as overriding an endpoint in a configuration file.

Example serverless.yml configuration:

custom:
  localstack:
    stages:
      - local
    host: http://localhost
    edgePort: 4566
    autostart: true

provider:
  name: aws
  runtime: nodejs18.x
  # ... other provider settings

Now, you can spin up Lambdas, SQS queues, APIs, and databases entirely on your local machine. Run your tests against this local infrastructure, and then tear everything down in seconds.

This same approach is incredibly effective in a CI environment. You spin up LocalStack in a Docker container, run your integration tests, and shut it down. It’s faster, cleaner, and a more efficient way to validate your infrastructure code. You get service logs, local debugging capabilities, and even dashboard integrations with tools like Testcontainers. This is a workflow used by large corporations and solo developers alike.

Important Caveats: It’s Not a Perfect Clone

Here is something you must not misunderstand: LocalStack is not a perfect clone of AWS. It is an emulation, and some services may behave slightly differently than their cloud counterparts. Certain edge cases might not be identical, and not every single AWS service is supported with 100% fidelity.

Because of this, you should always test critical application paths in a real AWS environment before deploying to production.

Think of LocalStack as your inner development loop. It’s your CI test environment and your personal sandbox. It is not, and should not be, your production environment.

A New Way to Develop

When used for its intended purpose, LocalStack can fundamentally change your development process. It allows you to run AWS locally, enabling you to ship code faster, test infrastructure with confidence, and avoid those dreaded surprise cloud bills.

It isn’t perfect, and there are drawbacks, but the benefits to your development speed and safety are undeniable. Go give it a shot and see how it transforms your workflow.


Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Audio Interrupted

We lost the audio stream. Retry with shorter sentences?