Updated Nov 25, 202613 min read

LocalStack Alternatives in 2026

Seven ways to run and test AWS-backed code locally now that LocalStack needs an account and an auth token, ranked by how much local setup each one removes.

Illustration for LocalStack Alternatives in 2026

The best LocalStack alternative for a backend that mostly needs Postgres, queues and buckets is Encore: your code declares those resources, encore run starts local versions of them, and a deploy creates the same resources in your own AWS or GCP account. If your code calls AWS APIs directly, use Floci or AWS Emulator. Moto covers Python tests and the SAM CLI covers Lambda.

Why are teams replacing LocalStack in 2026?

LocalStack was the default container for running S3, SQS and DynamoDB on a laptop and in CI. In March 2026 it became a single image that needs an account and an auth token, and pipelines that pulled localstack/localstack:latest without a token started failing.

  • Every developer machine and every CI job now needs a token, or a pinned Community tag (the LocalStack team suggests 4.12) that no longer gets updates.
  • The local resources usually come from Terraform, CDK or init scripts pointed at port 4566, which is a second copy of the infrastructure to keep in sync with production.
  • Emulated behavior around IAM, event delivery and timeouts can differ from AWS in ways that only show up after a deploy.

The replacement depends on what LocalStack was doing for you. If it stood in for a database, a queue and a bucket, you can skip emulation. If your code calls DynamoDB, Step Functions or Cognito, you still need an emulator.

What are the best LocalStack alternatives in 2026?

RankAlternativeVersion (November 2026)ApproachBest fit
1Encorev1.58.9Infrastructure declared in application code, run locally by encore run and provisioned in your own AWS or GCP accountBackends whose code needs Postgres, Pub/Sub and buckets locally, in previews and in production
2Floci2.5.0MIT-licensed AWS API emulator on port 4566, no account or tokenGetting an existing LocalStack setup working again with an image swap
3AWS Emulator1.0.533.1AWS's own local emulator of the AWS APIs, no AWS account neededCode that calls AWS APIs directly and wants AWS's own fidelity tests behind the emulator
4fakecloudv0.52.0AGPL-3.0 AWS emulator as a single binary, with test assertion SDKsIntegration tests that inspect emails, messages and invocations
5Moto5.2.5Python library that mocks AWS, with a standalone server modePython test suites using boto3
6Testcontainerstestcontainers-go v0.45.0Starts real Postgres, Redis, Kafka and other containers from your testsIntegration tests against the actual software
7AWS SAM CLIv1.174.0Runs Lambda functions and API Gateway locally in DockerLambda apps defined with SAM or CloudFormation

The ranking puts first the option that removes the most local configuration for a typical backend, then the tools that emulate or mock AWS for code that needs the APIs themselves. Versions are from each project's releases page, package registry or, for AWS Emulator, its published version list.

Verdict. Pick Encore when LocalStack was standing in for a database, a queue and a bucket, because it removes the emulator and the Terraform behind it. Pick Floci when you need the AWS APIs and want the smallest change from LocalStack, and try AWS Emulator when you want the emulator AWS maintains.

Compare features across all seven alternatives
CapabilityEncoreFlociAWS EmulatorfakecloudMotoTestcontainersAWS SAM CLI
What runs locallyYour app plus the Postgres, Pub/Sub and buckets it declaresEmulated AWS APIsEmulated AWS APIsEmulated AWS APIsMocked AWS APIsReal service containersLambda functions and API Gateway
Account or tokenNo account needed for local developmentNoNoNoNoNoNo(AWS credentials only for deploys)
DockerFor local databases, which encore run starts for youYesLinux package, or a Docker image you buildNo(binary) or DockerNo(in-process) or Docker for server modeYesYes
Where the local infrastructure is definedApplication codeTerraform, CDK or scripts against the emulatorTerraform, CDK or scripts against the emulatorTerraform, CDK or scripts against the emulatorTest setupTest setupSAM or CloudFormation templates
Production deployProvisions RDS, SNS/SQS, S3 and Secrets Manager in your AWS account, or the GCP equivalentsNot includedNot includedNot includedNot includedNot includedsam deploy through CloudFormation
Tracing and dashboardLocal dashboard with distributed tracingWeb console at /_floci/uiNo graphical interfaceIntrospection endpoints and SDKsDashboard at /moto-api/NoLogs
Skip the emulator for Postgres, queues and buckets

With Encore, encore run starts local Postgres, Pub/Sub and buckets from your backend code, and a deploy creates the same resources in your own AWS or GCP account.

Get started

Why is Encore the first LocalStack alternative?

Encore

Most teams run LocalStack so that the app on a laptop has a bucket, a queue and a database to talk to. Encore gets there from the other direction with infrastructure from code. The database, the Pub/Sub topic and the bucket are declared in the application, encore run starts local versions of each, and a deploy creates RDS, SNS/SQS and S3 (or Cloud SQL, Pub/Sub and Cloud Storage) in your own cloud account from the same declarations. There is no emulator to point Terraform at, because these resources have no separate Terraform.

Application code passes through Encore and infrastructure guardrails to resources provisioned in your own AWS or GCP account.
Encore provisions the infrastructure your application declares in your own AWS or GCP account.

With LocalStack, a receipts flow gets its local bucket and queue from an init script or Terraform aimed at port 4566, and the app reads endpoint overrides from environment variables. With Encore, this file is the whole definition:

// orders/orders.ts (encore.dev v1.58) import { api, APIError } from "encore.dev/api"; import { SQLDatabase } from "encore.dev/storage/sqldb"; import { Topic } from "encore.dev/pubsub"; import { Bucket } from "encore.dev/storage/objects"; // Local Postgres with migrations applied on `encore run`; RDS or Cloud SQL when deployed. const db = new SQLDatabase("orders", { migrations: "./migrations" }); // Local topic on `encore run`; SNS/SQS or GCP Pub/Sub when deployed. export const orderPlaced = new Topic<{ orderId: string }>("order-placed", { deliveryGuarantee: "at-least-once", }); // Local files on `encore run`; S3 or Cloud Storage when deployed. export const receipts = new Bucket("receipts", { versioned: false }); const maxReceiptBytes = 2 * 1024 * 1024; export const placeOrder = api( { method: "POST", path: "/orders", expose: true }, async ({ pdf }: { pdf: string }): Promise<{ orderId: string }> => { const data = Buffer.from(pdf, "base64"); if (data.length === 0 || data.length > maxReceiptBytes) { throw APIError.invalidArgument("receipt must be a PDF of at most 2 MiB"); } const row = await db.queryRow<{ id: string }>` INSERT INTO orders DEFAULT VALUES RETURNING id::text AS id `; const orderId = row!.id; await receipts.upload(`${orderId}.pdf`, data, { contentType: "application/pdf" }); await orderPlaced.publish({ orderId }); return { orderId }; }, );
The database, topic and bucket sit next to the endpoint that uses them, and encore run starts local versions of each.

placeOrder inserts a row, stores the receipt under the new order id and publishes orderPlaced. Locally, that is a Postgres database, a local Pub/Sub implementation and a folder on disk. The same declarations drive preview environments, which Encore hosts for each pull request, and production in your AWS or GCP account, so the gap between "works on my machine" and "works in AWS" is the gap between local and managed Postgres, not between an emulator and AWS.

Once AI coding agents write part of the backend, an agent that needs a bucket declares it in the same change as the code that uses it and runs it with encore run right away, with no Terraform module or console step for anyone to add first.

Key features

  • encore run starts every service along with the Postgres databases, Pub/Sub topics and buckets declared in code, and applies migrations.
  • Secrets are declared in code and set per environment with encore secret set.
  • The local development dashboard shows a trace for each request, including the queries, publishes and uploads it made.
  • A deploy provisions the declared resources in your AWS or GCP account, and encore build docker builds an image you can run on infrastructure you manage.

Good to know

Encore is not an AWS API emulator, so code that calls DynamoDB, Step Functions or Cognito through the AWS SDK still needs an AWS account or one of the emulators below. Cron jobs do not run on their schedule locally, so you call the cron endpoint directly to test one. Adopting Encore means declaring infrastructure through its APIs, which is a bigger change than swapping an image, and it can start with one service while the rest keeps its current setup.

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

Is Floci a drop-in replacement for LocalStack?

Floci

Yes, for most setups: Floci is an MIT-licensed AWS emulator built as a replacement for the LocalStack container. It runs without an account or auth token, serves every service on http://localhost:4566 and accepts any non-empty credentials, so the AWS SDKs, CLI, Terraform and CDK keep working against it.

~/app
# docker-compose.yml: image floci/floci:latest, ports 4566:4566$ docker compose up -d$ aws --endpoint-url http://localhost:4566 s3 mb s3://my-bucket
Floci serves the AWS APIs on port 4566, like LocalStack.

Good to know

Floci is the shortest path back to a working LocalStack setup without a token, since the port and SDK configuration stay the same and the image name changes. Check the operations your code calls against its service list. The Terraform or scripts that create the local resources are still a second definition you maintain next to production.

Should you use AWS Emulator, the emulator from AWS?

AWS Emulator

Use it when you want the emulator AWS maintains: AWS Emulator is a local emulator of the AWS APIs that needs no AWS account. On Linux it installs from an RPM or Debian package and runs as a command-line tool. On macOS and Windows you build a Docker image from the Dockerfile in the docs, since AWS does not publish a prebuilt one.

~/app
$ aws-emulator$ export AWS_ENDPOINT_URL=https://127.0.0.1:9297$ export AWS_SHARED_CREDENTIALS_FILE=~/.aws/emulator/9297/emulator_credentials$ export AWS_CA_BUNDLE=~/.aws/emulator/9297/ca.pem$ export AWS_REGION=us-east-1$ aws s3api create-bucket --bucket receipts
The emulator listens on port 9297 and writes per-run credentials and a certificate; the docs list the full set of variables.

Good to know

By default it expects SigV4-signed requests over HTTPS with credentials it generates per run, which is closer to AWS than emulators that accept any key. The limitations are explicit: it does not evaluate IAM policies the way AWS does, it keeps every resource in memory and drops them when it stops, it treats all requests as one account and region, and it is meant for test runs, not a long-running environment. AWS publishes per-service fidelity scores with each release, and control-plane calls match AWS most closely today.

When is fakecloud the better choice?

fakecloud

fakecloud is an AGPL-3.0 AWS emulator that runs as a single binary or a Docker image. Next to the AWS APIs it ships test SDKs that let a test reset state and inspect side effects such as SES emails, SNS messages or Lambda invocations.

~/app
$ fakecloud$ aws --endpoint-url http://localhost:4566 sqs create-queue --queue-name my-queue
fakecloud runs without Docker and accepts the standard AWS CLI and SDKs.

Good to know

fakecloud fits integration tests that need to assert on what AWS did, not only call it. Its coverage and conformance numbers are self-reported, so verify the services you depend on, and check the AGPL-3.0 license against your company's policy.

Is Moto enough for Python tests?

Moto

Yes, for unit and integration tests: Moto mocks AWS for Python, usually through its @mock_aws decorator inside pytest, and it has a standalone server mode that any AWS SDK can call.

# moto 5.2.5 import boto3 from moto import mock_aws @mock_aws def test_upload_receipt(): s3 = boto3.client("s3", region_name="us-east-1") s3.create_bucket(Bucket="receipts") s3.put_object(Bucket="receipts", Key="r1.pdf", Body=b"...") assert s3.list_objects_v2(Bucket="receipts")["KeyCount"] == 1
Moto intercepts boto3 calls in-process, so the test needs no network or Docker.

Good to know

Resources exist only for the duration of a test, and event delivery between services is limited, so Moto is a poor fit for a long-running environment that a whole team develops against.

When should you use Testcontainers instead of an emulator?

Testcontainers

Use it when the thing you would emulate is open source software. Testcontainers starts throwaway Docker containers from test code in Java, Go, Node.js, Python, Rust, .NET and other languages, so instead of emulating RDS or ElastiCache you test against a real Postgres or Redis.

from testcontainers.postgres import PostgresContainer def test_orders_repository(): with PostgresContainer("postgres:17") as pg: url = pg.get_connection_url() # run migrations and queries against a real Postgres at `url`
Each test run gets a fresh Postgres container that is removed afterwards.

Good to know

Testcontainers only covers services that have a container image, so AWS-specific APIs still need an emulator. It is built for tests, not for a development environment that stays up all day.

Does the AWS SAM CLI replace LocalStack for Lambda?

AWS SAM CLI

For the Lambda part, yes: the AWS SAM CLI runs Lambda functions and API Gateway endpoints locally in containers that match the Lambda runtime, using your SAM template.

~/app
$ sam build$ sam local start-api
SAM serves API Gateway routes locally and invokes the matching function per request.

Good to know

SAM covers the compute side and does not emulate the databases, queues or buckets a function talks to, so teams pair it with a dev account or an emulator. It only targets AWS and depends on SAM or CloudFormation templates.

What about DynamoDB Local and other single-service emulators?

If DynamoDB is the only AWS API your code calls, DynamoDB Local is the official downloadable version of DynamoDB and is simpler than a full emulator. The trade-off is one tool per service: the queue, the bucket and the database each need their own local stand-in, which is the sprawl that pushed teams toward LocalStack in the first place.

Which LocalStack alternative should you pick?

  • Encore when your backend mostly needs Postgres, Pub/Sub and buckets, and you want one declaration in code to cover local, preview and production.
  • Floci when you want your LocalStack setup working again without an account and with the fewest changes.
  • AWS Emulator when you want AWS's own emulator for tests and can work within its in-memory, single-account model.
  • fakecloud for integration tests that assert on AWS side effects.
  • Moto for Python test suites using boto3.
  • Testcontainers for tests against real Postgres, Redis or Kafka.
  • AWS SAM CLI for Lambda-first apps already defined in SAM templates.

An emulator is the right tool when your code calls AWS-specific APIs. When the app mainly needs a working database, queue and bucket on a laptop and the same resources in AWS, Encore ranks first, because it removes the emulator and the Terraform behind it instead of replacing them. The quick start shows what encore run starts locally.

Frequently asked questions

What is the best alternative to LocalStack?

For a backend that mostly needs Postgres, queues and object storage, Encore: the code declares those resources, encore run starts local versions of them, and a deploy creates the matching services in your own AWS or GCP account, so there is no emulator to configure. If your code calls AWS APIs directly, use Floci as a drop-in for the LocalStack container or AWS Emulator, the emulator AWS publishes itself. Use Moto for Python tests, the SAM CLI for Lambda and Testcontainers for real Postgres or Redis in tests.

Is LocalStack still free?

No. As of March 2026, LocalStack for AWS ships as one image that asks for an account and an auth token, including in CI. Older Community image tags, such as 4.12, can still be pinned, but they get no new AWS coverage, fixes or security updates.

Does AWS have its own LocalStack alternative?

Yes. AWS Emulator is a local emulator of the AWS APIs that AWS publishes and documents itself. It runs as a command-line tool on Linux or in a Docker image you build on macOS and Windows, needs no AWS account, keeps resources in memory and does not evaluate IAM policies the way AWS does.

Is Floci a drop-in replacement for LocalStack?

Yes. For most setups, Floci serves the AWS APIs on localhost:4566, accepts any non-empty credentials and works with the standard AWS SDKs, CLI, Terraform and CDK, so the usual change is the image name in docker-compose.yml. Check the operations your code calls against its service list.

Do I need an AWS emulator at all?

No. If your app mostly needs Postgres, queues and object storage, running local versions of those resources is simpler and closer to production than emulating AWS. You need an emulator when your code calls AWS-specific APIs such as DynamoDB, Step Functions or Cognito directly.

Deploy to your cloud on AWS and Google Cloud without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders