AWS Emulator vs LocalStack vs Moto: Local AWS Testing Compared (2026)

AWS Emulator vs LocalStack vs Moto: Local AWS Testing Compared (2026)

AWS Emulator vs LocalStack vs Moto: Local AWS Testing Compared (2026)

For a decade, “test against AWS locally” meant picking between a Python mocking library and a third-party emulator, and hoping neither lied to you. In November 2026 that changed. On November 11, AWS shipped AWS Emulator, a free, open-source local emulator written in Rust that publishes a per-service fidelity score with every release. It arrived eight months after LocalStack folded its Community image into a single, account-gated distribution, and while Moto quietly kept doing what it has always done inside Python test processes. The aws emulator vs localstack question is therefore new, and it matters now because AI coding agents run your test suite dozens of times per task. An emulator that silently accepts a bad request costs more when a machine iterates on it. This guide gives you a verified feature comparison, a decision matrix, and CI and agent-loop recipes you can copy.

What this covers: how each tool intercepts AWS calls, what “fidelity” really means for each, the IAM and multi-account gaps, 2026 pricing and licensing, and a layered test strategy that uses all three where each is strongest.

Context and Background

Local AWS testing exists because real AWS is slow, costs money, and needs credentials that do not belong on a developer laptop or inside an untrusted CI runner. A test that creates a DynamoDB table in a real account takes seconds and leaves debris when it crashes. A local substitute answers in milliseconds and vanishes when the process exits.

Three approaches have dominated. Moto is a Python library that patches the AWS SDK for Python (boto3/botocore) so calls never leave the process; it also ships a standalone server for other languages. Moto is Apache-2.0 licensed, requires Python 3.10 or later, and PyPI lists version 5.2.5, released October 27, 2026, as the latest stable at the time of writing. LocalStack is a container that emulates a large slice of AWS behind a single edge endpoint. Its historical Community edition was Apache-2.0 open source, and its commercial tiers added features like IAM enforcement and state persistence.

That LocalStack picture changed in 2026. In a December 2025 post, updated March 17, 2026, LocalStack announced that Community and Pro would merge into one image at localstack/localstack that requires an auth token. The Community source stays on GitHub but is marked inactive, and old tags keep running without authentication but get no security fixes. The pricing change took effect March 23, 2026, and the free Hobby tier is explicitly non-commercial.

Then AWS entered. The AWS News Blog launch post, published November 11 and updated November 12, 2026, describes a Rust emulator that serves HTTPS on 127.0.0.1:9297. It returns HTTP 501 for anything it does not implement and does not evaluate IAM or resource policies. The repository’s README lists the CC0-1.0 license for the project code. If you track the wider pre-conference launch wave, our AWS re:Invent 2026 preview for platform teams places this release in context.

The incumbents are not equivalent tools with different logos. They sit at different points on an axis that runs from “mock the SDK” to “emulate the service contract,” and that axis is what the rest of this post is about.

AWS Emulator vs LocalStack vs Moto: How Each One Intercepts AWS

Direct answer: Moto mocks AWS inside your Python process, LocalStack emulates AWS services in a Docker container behind one endpoint, and AWS Emulator is a first-party Rust process that implements AWS API models and measures itself against real AWS. Choose Moto for fast Python unit tests, LocalStack for broad behavior and IAM checks, and AWS Emulator for loud, measured contract fidelity.

AWS Emulator vs LocalStack vs Moto interception points between application code and real AWS

Figure 1: Where each tool intercepts an AWS call. Moto patches the SDK inside the test process, while LocalStack and AWS Emulator receive real signed HTTP requests on a local endpoint.

The diagram traces one SDK call from application code toward AWS. On the left path, Moto’s mock_aws decorator intercepts the request inside botocore before any socket opens. On the two right paths, the SDK builds and signs a normal HTTP request, but AWS_ENDPOINT_URL sends it to localhost:4566 for LocalStack or 127.0.0.1:9297 for AWS Emulator. Only the bottom path, an ephemeral real account, touches IAM evaluation, Regions and cross-account trust exactly as production does.

The comparison table

Dimension AWS Emulator LocalStack for AWS Moto
Maintainer AWS LocalStack GmbH Open-source community
Language / runtime Rust native binary Container image Python library or server
License CC0-1.0 per repo README Commercial image; old Community code Apache-2.0, inactive Apache-2.0
Price No additional service fee Hobby free, non-commercial; Base $39 per license per month billed annually Free
Install RPM or Debian on Linux; build your own Docker image on macOS and Windows Docker image with auth token pip install moto or moto[server]
Default endpoint HTTPS 127.0.0.1:9297 localhost:4566 edge port In-process; server on port 5000
Credentials Keys generated at start, prefix EMULATOR; others rejected Auth token for the product; AWS keys usually dummy Any; fake keys recommended
SigV4 Required in local process mode Not required by default Not required
IAM policy evaluation Not evaluated Opt-in ENFORCE_IAM=1, paid tiers and Student Basic, opt-in
Accounts / Regions Single account 000000000000; no cross-account or cross-Region behavior Multi-account and multi-Region emulation Default account 123456789012; switchable
Unimplemented calls HTTP 501, fails loudly Varies by service and tier Varies; often a NotImplementedError
Fidelity evidence Per-service k of n scores per release, public test suite Coverage docs per service Implementation coverage lists
Embedded / in-process aws-emulator-embedded Rust crate No Yes, Python only
Telemetry Anonymous usage data on by default; can be switched off Not compared here; check LocalStack docs Not compared here

Prices are from the LocalStack pricing page as read on November 30, 2026; the Base monthly-billed price is listed at $45 per license. Treat every price as a snapshot.

Mock versus emulator is a real architectural difference

Moto’s in-process mode is the fastest of the three because nothing crosses a process boundary. The decorator swaps botocore’s transport, so a put_object becomes a Python dictionary update. That speed comes from skipping the parts of the request path that break most often in production: endpoint resolution, TLS, request signing, and HTTP serialization. A Moto test can pass even when a region string is malformed or a request would never sign correctly.

LocalStack and AWS Emulator are network emulators. Your SDK serializes a real request, sends it over a socket, and parses a real response. That exercises the same code path your production binary uses, and it works from any language. Go, Java, Rust, TypeScript and the AWS CLI all honor the shared AWS_ENDPOINT_URL setting described in the AWS SDKs and Tools reference guide, plus per-service variants such as AWS_ENDPOINT_URL_S3. The cost is a running process, a port, and startup time before the first test.

AWS Emulator tightens this further by requiring SigV4 with keys it generated at startup. A test that accidentally loads a developer’s real profile fails at the emulator, because it rejects requests signed with any other key. That is a safety property, not only a fidelity one. The launch post also tells you to unset AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN and AWS_PROFILE for the same reason.

Fidelity is a measured contract, not a feature list

The most important design choice in AWS Emulator is its definition of correctness. A fidelity test is a short program that runs an AWS SDK workflow and asserts behavior. Each test is verified against real AWS first. A test passes only if the emulator matches AWS on every call’s status code, response body, error code and message, and on the resources the workflow creates. Each release reports scores per service as “k of n,” and the suite lives publicly in the aws-emulator-evaluation-suite repository, failing tests included.

That changes how you read a compatibility claim. LocalStack and Moto document which operations they implement, which tells you an API exists locally. A k-of-n score tells you how often a realistic workflow behaves byte-for-byte like AWS. The two are different questions. An operation can be “implemented” yet return a subtly different error code, and that difference is exactly what breaks retry logic.

Be careful with the number, though. AWS notes that a score can fall when new tests are added even while the emulator improves. A service moving from 40 of 50 to 42 of 60 has more coverage and a lower ratio. Read the denominator, read the failing tests for the operations you use, and ignore any single headline percentage.

Loud failure beats silent success

AWS Emulator returns HTTP 501 Not Implemented for any operation it lacks. Your test fails immediately with an unambiguous signal. Contrast that with a mock that returns an empty-but-valid response for an unsupported parameter, which lets a bug ride all the way to staging.

For humans, loud failure is a convenience. For AI coding agents, it is close to essential. An agent reads test output and decides what to change next. A 501 says “the environment cannot answer this,” which is a different instruction from “your code is wrong.” A silent success teaches the agent that broken code works. We return to this in the agent-loop recipe below.

Walk-through: Setup, Decision Matrix and Agent Loops

The fastest way to understand the trade-offs is to wire each tool into the same small workload: create a DynamoDB table, write an item, read it back, and push a message to SQS. The sections below show the setup for each, then a decision matrix, then CI and agent-loop recipes. Commands reflect each project’s documentation as of November 2026. Anything marked as a placeholder must be checked against your installed version.

AWS Emulator setup on Linux and macOS

On Linux, AWS Emulator installs from an RPM or Debian package. The RPM adds an aws-emulator command to /usr/bin/; the launch post demonstrates it on Amazon Linux 2023. AWS does not publish a ready-made container image. On macOS and Windows you build an image from the short Dockerfile in the documentation and run the emulator in a container. Building from source with Cargo is also documented, on Linux only.

At startup the emulator generates fresh credentials, a config file and a TLS certificate under ~/.aws/emulator/9297/. Point the SDK at those files rather than at your normal profile. Here is the environment block from the launch post, wrapped in a small script:

#!/usr/bin/env bash
# Start the emulator in the background (Linux package install)
aws-emulator --telemetry off &

# Wait until it answers (self-signed cert, so trust it explicitly or use -k locally)
until curl -sk https://127.0.0.1:9297/__admin/health >/dev/null; do sleep 0.2; done

EMU_DIR="$HOME/.aws/emulator/9297"
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILE
export AWS_ENDPOINT_URL="https://127.0.0.1:9297"
export AWS_SHARED_CREDENTIALS_FILE="$EMU_DIR/credentials"   # placeholder filename: check $EMU_DIR
export AWS_CONFIG_FILE="$EMU_DIR/config"                    # placeholder filename: check $EMU_DIR
export AWS_EC2_METADATA_DISABLED=true
export AWS_DISABLE_HOST_PREFIX_INJECTION=true
export AWS_REGION=us-east-1 AWS_DEFAULT_REGION=us-east-1

aws dynamodb create-table --table-name orders \
  --attribute-definitions AttributeName=pk,AttributeType=S \
  --key-schema AttributeName=pk,KeyType=HASH \
  --billing-mode PAY_PER_REQUEST

Three details deserve attention. First, telemetry is on by default; the README documents --telemetry off, the EMULATOR_TELEMETRY=off environment variable, and an enabled = false setting under [telemetry] in config.toml. Second, the endpoint is HTTPS with the emulator’s own certificate, so some SDKs, the AWS SDK for Java among them, need a trust store that includes it. Third, AWS_DISABLE_HOST_PREFIX_INJECTION matters. Some AWS APIs prepend a hostname prefix to the endpoint, which would break a fixed 127.0.0.1 address.

The repository README also documents an agent skill: aws agent-toolkit add-skill --skill-name aws-emulator --region us-east-1, which needs AWS CLI 2.35.0 or later. That skill teaches a coding agent how to start and target the emulator, which removes most of the environment plumbing above from your prompts.

AWS Emulator embedded mode for Rust

The second mode is in-process. For projects on the AWS SDK for Rust, you add the aws-emulator-embedded crate from GitHub under [dev-dependencies]. Each embedded instance holds its own state, so tests do not share buckets, tables or queues and can run in parallel. The launch post’s example creates a DynamoDB table, writes an item and reads it back inside a #[tokio::test].

[dev-dependencies]
# Crate name per the AWS launch post; pin a commit or tag in real projects.
aws-emulator-embedded = { git = "https://github.com/aws/aws-emulator" }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

This is the Rust equivalent of Moto’s decorator, with one difference: the embedded emulator is the same implementation, scored by the same fidelity suite, as the standalone binary. You do not get a second, weaker mock for unit tests. Copy the exact constructor and client wiring from the repository’s README rather than from a blog, because the embedded API was weeks old when this post was written.

LocalStack setup after the 2026 licensing change

LocalStack still runs as a container exposing its edge endpoint on port 4566. Since March 23, 2026, the localstack/localstack:latest image asks for an auth token, and CI runs need a CI auth token. The free Hobby plan covers individual, non-commercial use. Commercial teams need Base or higher. LocalStack has also removed fixed CI credit allotments, opening CI to all plans within a fair-usage policy.

# Commercial or Hobby use with an account
export LOCALSTACK_AUTH_TOKEN="<token from your LocalStack workspace>"
docker run --rm -d -p 4566:4566 \
  -e LOCALSTACK_AUTH_TOKEN \
  -e ENFORCE_IAM=1 \
  localstack/localstack:latest

export AWS_ENDPOINT_URL="http://localhost:4566"
export AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-1
aws sqs create-queue --queue-name orders-events

The ENFORCE_IAM=1 flag is the reason many teams pay. LocalStack’s docs state that IAM enforcement is disabled by default and that this variable turns it on. Its licensing page lists IAM policy enforcement, local state persistence and Stack Insights in Base and above, and IAM Policy Streams plus the AWS Replicator in Ultimate. The Hobby tier is limited to core services such as S3, SQS, SNS, DynamoDB, Lambda, CloudFormation, IAM, STS, KMS and Secrets Manager.

Teams that cannot take an account dependency can pin an older Community tag, for example 4.12 as LocalStack itself suggests. That works, but you are now running an unpatched container that will drift further from AWS every month. Treat it as a migration bridge, not a strategy.

Moto setup in Python and server mode

Moto remains the shortest path for Python code. You decorate a test with @mock_aws, create the resources the code expects, call the code under test, and assert on the stored state.

import boto3
from moto import mock_aws

from orders.service import record_order  # your code under test

@mock_aws
def test_record_order_writes_item_and_event():
    ddb = boto3.client("dynamodb", region_name="us-east-1")
    ddb.create_table(
        TableName="orders",
        AttributeDefinitions=[{"AttributeName": "pk", "AttributeType": "S"}],
        KeySchema=[{"AttributeName": "pk", "KeyType": "HASH"}],
        BillingMode="PAY_PER_REQUEST",
    )
    sqs = boto3.client("sqs", region_name="us-east-1")
    q = sqs.create_queue(QueueName="orders-events")["QueueUrl"]

    record_order(order_id="o-1", total=42)

    item = ddb.get_item(TableName="orders", Key={"pk": {"S": "o-1"}})["Item"]
    assert item["pk"]["S"] == "o-1"
    msgs = sqs.receive_message(QueueUrl=q).get("Messages", [])
    assert len(msgs) == 1

For non-Python code, pip install moto[server] and run moto_server, which listens on port 5000 by default. Inside a Python test harness, ThreadedMotoServer from moto.server starts the same server on a thread; port=0 picks a free port. Container images are published as motoserver/moto and ghcr.io/getmoto/motoserver. A POST to /moto-api/reset wipes all backend state between tests, and a dashboard lives at /moto-api/.

Two Moto quirks catch people. Its docs recommend localhost rather than 127.0.0.1 for server mode. And its IAM-like access control is opt-in through INITIAL_NO_AUTH_ACTION_COUNT or the set_initial_no_auth_action_count decorator; the docs call the implementation “very basic.” Moto processes requests in account 123456789012 by default, which you can change with MOTO_ACCOUNT_ID, an x-moto-account-id header in server mode, or an STS assume_role into a role ARN from another account.

Decision matrix

Decision flow for AWS Emulator vs LocalStack vs Moto in local AWS testing

Figure 2: A decision flow for local AWS testing. The first fork is language and process model; the second is whether the test must catch policy or multi-account errors.

The flow starts with the question most comparisons skip: where does the test run? A pure-Python unit test gains nothing from a network hop, so Moto wins on speed. Anything polyglot or binary-level needs an endpoint. From there, the deciding question is whether a wrong IAM decision is a bug you need caught locally. If it is, only LocalStack with ENFORCE_IAM=1 or a real AWS account will catch it.

Scenario Best fit Why Watch out for
Python unit tests for Lambda handlers Moto In-process, no container, no license Skips signing and HTTP; weak IAM
Rust service integration tests AWS Emulator embedded Same scored implementation, isolated state per test New API surface; pin versions
Polyglot integration suite in CI AWS Emulator or LocalStack Real HTTP and SDK serialization Emulator lacks IAM; LocalStack needs token
AI coding agent inner loop AWS Emulator 501 on gaps, SigV4 with generated keys, low resource use Single account and Region only
IAM least-privilege regression tests LocalStack Base+ with ENFORCE_IAM=1, then real AWS Only option that evaluates policies locally Coverage is not identical to AWS
Cross-account or cross-Region flows Real AWS sandbox accounts; LocalStack for early checks Emulator is single-account by design Local multi-account semantics differ
Infrastructure as code deploy tests LocalStack or real AWS Broad CloudFormation and service coverage Emulator coverage per service is k of n
Open-source project with no budget Moto or AWS Emulator Both free; LocalStack OSS plan needs approval Check emulator fidelity for your services

Read the matrix as layered, not exclusive. Most teams that test AWS seriously end up using two of the three tools plus a real account. The question is which layer carries which risk.

The agent-loop recipe

AI coding agents change the economics of local AWS testing. A human might run integration tests a few times an hour. An agent iterating on a failing test might run them every minute, and it will read every line of output as evidence. Three properties matter for that loop: fast startup, isolated state, and honest failure signals.

Sequence of an AI coding agent testing against AWS Emulator locally

Figure 3: An AI coding agent’s test loop against a local emulator. The 501 path tells the agent the environment is the limit, so it stops editing code and escalates.

The sequence shows an agent editing code, running the suite, and receiving either an AWS-shaped error, a pass, or a 501. The first two are normal feedback. The third should end the loop with a note to a human, because no code change will make an unimplemented operation succeed. The launch post demonstrated this pattern with Kiro creating a DynamoDB table called kiro-demo and reading an item back, and it names Claude Code as another suitable agent. For a broader view of how these agents differ, see our comparison of agentic IDEs: Cursor vs Windsurf vs Claude Code.

Encode the escalation rule in the agent’s project instructions. A short rule works: “If a test fails with HTTP 501 from the local emulator, do not change application code; report the operation name.” Add two more. Never export real AWS credentials in the agent’s shell. Always start the emulator through the documented health check rather than sleeping a fixed time.

The single-account limit is an advantage in this loop, not only a gap. An agent that cannot reach a second account, a second Region, or real credentials has a smaller blast radius. Pair the emulator with a sandboxed shell and you have a loop where the worst outcome is a wasted test run.

The CI recipe

In CI, the same tools stack into layers. The order below runs the cheapest and most deterministic checks first and reserves real AWS for the risks only real AWS can test.

# Illustrative GitHub Actions layout; adapt package install to your runner image.
jobs:
  unit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install -r requirements-dev.txt   # includes moto
      - run: pytest tests/unit

  integration-emulator:
    needs: unit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ./ci/install-aws-emulator.sh          # placeholder: install the .deb from the release page
      - run: aws-emulator --telemetry off &
      - run: until curl -sk https://127.0.0.1:9297/__admin/health; do sleep 0.5; done
      - run: ./ci/emulator-env.sh pytest tests/integration

  iam-regression:
    needs: integration-emulator
    runs-on: ubuntu-latest
    services:
      localstack:
        image: localstack/localstack:latest
        ports: ["4566:4566"]
        env:
          LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_CI_TOKEN }}
          ENFORCE_IAM: "1"
    steps:
      - uses: actions/checkout@v4
      - run: AWS_ENDPOINT_URL=http://localhost:4566 pytest tests/iam

A final stage, usually on merge to main, deploys to an ephemeral real account and runs smoke tests. That stage is where cross-account roles, service control policies and Region-specific behavior get tested for real. If your infrastructure is Terraform or OpenTofu, our guide to infrastructure as code testing with native tests, Terratest and policy gates covers how to wire plan review and policy checks into this same pipeline.

How AWS builds the emulator, and why it matters to you

The launch post is unusually specific about how the emulator is produced. Agents build and maintain it from the published AWS API models, running on Amazon Bedrock AgentCore Runtime with AWS CodePipeline and AWS CodeCommit. One group of agents finds gaps by comparing emulator responses with AWS and with the Smithy models. Another group writes and reviews fixes. Every push triggers a pipeline that executes the fidelity tests before publication, and an independent security agent reviews changes during development and again in the release pipeline.

Two consequences follow. First, coverage can grow quickly, because the emulator supports the APIs of services that have a model in the AWS API models repository on GitHub. The launch post gives no total service count, so do not trust any third-party number you see quoted. Second, the generated code is only as good as the fidelity tests. A behavior nobody wrote a test for, such as an eventual-consistency window or a throttling threshold, is a behavior the emulator has no pressure to reproduce. The public evaluation suite is the real specification.

Trade-offs, Gotchas, and What Goes Wrong

Every local substitute lies somewhere. The useful question is where, and whether a later test layer catches the lie.

Layered local AWS testing pipeline from Moto to AWS Emulator to LocalStack IAM checks to a real AWS account

Figure 4: A layered test strategy. Each layer exists to catch a class of bug the layer before it cannot see, and real AWS remains the final gate.

The figure stacks four layers. Moto catches logic errors in milliseconds. AWS Emulator catches serialization, signing and API-contract errors. LocalStack with IAM enforcement catches many policy mistakes. An ephemeral AWS account catches everything else, including cross-account trust and Region behavior.

IAM is the biggest blind spot. AWS Emulator does not evaluate IAM or resource-based policies the way AWS does, and the launch post warns that a request AWS denies might succeed locally. A test suite that passes on the emulator says nothing about whether your role can actually call dynamodb:PutItem. LocalStack’s enforcement narrows that gap but does not close it; its own IAM coverage page documents which actions are checked. If you need to reason about why a call is denied, start with our deep dive on AWS IAM policy evaluation logic, SCPs and permission boundaries.

Single account, single partition of reality. AWS Emulator uses one account, 000000000000, with no cross-account or cross-Region behavior. Any architecture with a shared-services account, cross-account event buses, or multi-Region replication needs another layer. Moto lets you switch accounts per request, and LocalStack documents multi-account setups, but local multi-account semantics are an approximation of AWS Organizations, not a copy.

State and persistence differ. Moto state lives in process memory and resets on demand. LocalStack persistence is a paid feature from Base upward. The AWS Emulator launch post does not say whether state survives a restart, and the repository describes service state as in-memory; assume it does not persist. Design tests to create their own fixtures, which is good practice anyway.

Timing and limits are rarely emulated. None of the three should be trusted for throttling thresholds, eventual-consistency windows, Lambda cold starts or service quotas. Tests that depend on those behaviors belong in a real account, or in chaos experiments of the kind we cover in chaos engineering on Kubernetes with steady-state hypotheses.

Operational gotchas. The emulator’s HTTPS certificate trips SDKs with strict trust stores. Its default telemetry may conflict with policy in regulated environments, so turn it off explicitly in CI. LocalStack’s move to latest requiring a token broke pipelines that auto-pulled the image, and pinning an old tag trades that breakage for unpatched software. Moto’s server mode warns against binding 0.0.0.0 because anyone on the network can then reach it.

Anti-pattern: one tool for everything. Teams that run their entire suite on one emulator tend to grow tests that encode the emulator’s quirks. When they later move to real AWS, a batch of “regressions” appears that were never real behavior. Keep each layer narrow and keep a real-account stage, however small.

Practical Recommendations

Start by mapping which AWS operations your code actually calls. That list, not a vendor’s service count, decides which tool fits. For each operation, check the AWS Emulator release notes for its service’s k-of-n score and the failing tests in the evaluation suite. Check LocalStack’s coverage page and Moto’s implementation list for the same operations.

If you are a Python shop, keep Moto for unit tests. It is free, fast and stable, and nothing in the 2026 changes affects it. Add AWS Emulator as the integration layer if the services you use score well, because it exercises real HTTP, signing and error codes, and it fails loudly. Keep or adopt LocalStack where you need IAM enforcement, persistence, or services the emulator does not yet cover well, and budget for Base licenses if you are commercial.

For AI coding agents, default them to AWS Emulator, give them the documented agent skill, and write the 501 escalation rule into their instructions. Never give an agent real credentials for convenience. Reserve a short real-account stage in CI for IAM, cross-account and quota behavior, and treat its results as the only ground truth.

Finally, revisit the choice quarterly. AWS Emulator was weeks old at the time of writing, its fidelity scores will move, and LocalStack’s plans have changed twice in one year.

Checklist:

  • List the AWS operations your code calls and check each tool’s coverage for those operations.
  • Unit tests in Python on Moto; integration tests on AWS Emulator or LocalStack.
  • Turn off emulator telemetry in CI with --telemetry off or EMULATOR_TELEMETRY=off.
  • Gate readiness on /__admin/health, never on a fixed sleep.
  • Run IAM regression tests on LocalStack with ENFORCE_IAM=1 or on a real account.
  • Keep one real-account smoke stage for cross-account, Region and quota behavior.
  • Add a 501 escalation rule and a no-real-credentials rule to agent instructions.

Frequently Asked Questions

Is AWS Emulator a replacement for LocalStack?

Not fully, at least today. AWS Emulator covers the contract-fidelity and integration-test layer well: it implements AWS API models, publishes per-service k-of-n fidelity scores, and fails loudly with HTTP 501. However, it does not evaluate IAM or resource policies and runs a single account with no cross-account or cross-Region behavior. LocalStack’s paid tiers add IAM enforcement, persistence and multi-account setups. Many teams will run AWS Emulator for most integration tests and keep LocalStack for policy checks, or replace it with a real sandbox account.

Is AWS Emulator free and open source?

Yes. The AWS launch post describes it as free and open source, with no additional service fee; you pay only for AWS resources you deploy to AWS. The GitHub repository README lists CC0-1.0 for the project, with the vendored directory under Apache-2.0. Check the repository yourself before relying on that for compliance. Telemetry is enabled by default, sending anonymous usage and error data, and you can switch it off with a command-line flag, an environment variable, or a config file setting.

Is LocalStack still free in 2026?

Partly. Since March 23, 2026, LocalStack ships one image that requires an auth token. The Hobby plan is free but limited to non-commercial use and to core services such as S3, SQS, DynamoDB and Lambda. Commercial use needs a paid plan; LocalStack’s pricing page lists Base at $39 per license per month billed annually and Ultimate at $89. Students and approved open-source projects get free access. Old Community tags still run without a token but receive no updates.

When should I use Moto instead of an emulator?

Use Moto when your code under test is Python and the test is a unit test. The @mock_aws decorator intercepts boto3 inside the process, so there is no container, port, or license to manage, and tests run in milliseconds. Moto is Apache-2.0 and actively maintained. Switch to an endpoint-based emulator when you test other languages, need real HTTP serialization and signing, or want failures that reflect AWS’s exact error codes. Moto’s server mode covers other languages but keeps Moto’s fidelity profile.

Can AI coding agents like Claude Code or Kiro use AWS Emulator?

Yes. The AWS launch post demonstrates Kiro creating a DynamoDB table and reading an item against the emulator and names Claude Code as another fit. The repository documents an agent skill installed with aws agent-toolkit add-skill, which requires AWS CLI 2.35.0 or later. The emulator suits agents because it generates its own keys, rejects real credentials, and returns 501 for unimplemented operations. Tell your agent to stop and report on a 501 rather than rewrite working code.

Does AWS Emulator check IAM permissions?

No. The emulator does not evaluate IAM policies or resource-based policies the way AWS does, so a request AWS would deny can succeed locally. It does enforce SigV4 signing with the keys it generated at startup, which protects against accidentally using real credentials but is not authorization. For permission tests, use LocalStack with ENFORCE_IAM=1 on a tier that includes it, or run the tests in a real AWS sandbox account. AWS itself recommends testing security settings on AWS before production.

Further Reading

By Riju — about

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

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