AWS Emulator is AWS's official, open-source local emulator of the AWS APIs: you run it on your machine or in CI, point the AWS CLI or any AWS SDK at https://127.0.0.1:9297, and your code creates emulated S3 buckets, DynamoDB tables and queues without an AWS account or a bill. This AWS Emulator tutorial covers installing it on Linux and in Docker, wiring up boto3 and the JavaScript SDK v3, a pytest fixture that starts and stops it, a GitHub Actions job, and an honest comparison with LocalStack and moto.

Everything below is checked against the AWS Emulator user guide and the GitHub README as of late November 2026. The project ships new builds several times a day, so re-check flags against aws-emulator --help on the version you install.

What AWS Emulator is (and what it is not)

AWS released AWS Emulator in November 2026. It is a single local program, written in Rust, that serves one HTTPS endpoint for many AWS services. There is no GUI and no per-service container. According to the fidelity documentation, it supports the APIs of AWS services that have a model in the public aws/api-models-aws Smithy repository.

Press coverage disagrees on the headline number. InfoQ reports "more than 200 AWS services" generated from 400+ Smithy models, while InfoWorld cites 426 services. AWS's own docs don't give a count, and "has a model" is not the same as "works for your workflow". Use the per-service fidelity scores, covered below, instead of a headline number.

Key facts from the official docs:

  • No AWS account and no service fee. Requests never leave your machine. Telemetry (anonymous usage and error data) is on by default and can be turned off.
  • Default endpoint: HTTPS on 127.0.0.1:9297 with a self-signed certificate generated on every start.
  • SigV4 is enforced by default. Each run generates its own access key pair, and the emulator rejects your real AWS keys. This is a safety feature, not a bug.
  • One account (000000000000) and effectively one Region per process. To test several Regions, run several emulators on different ports.
  • State lives in memory only. Stopping the emulator deletes every resource, and there is no reset route, so restarting is how you get a clean slate.
  • License: CC0-1.0 for the project, with Apache-2.0 for the vendor/ directory.

The documented limitations matter most when you decide what to trust it for. It does not evaluate IAM policies or resource-based policies the way AWS does, so it is useless for permission testing. AWS checks its behavior against the real service in us-west-2 only (global services in us-east-1), and it hasn't been tested for long-running use or load. It is a tool for functional integration tests, not a staging environment.

Install AWS Emulator on Linux

On Linux (x86_64 or aarch64) you install a signed RPM or Debian package. These are the commands from the Linux getting-started guide:

# RPM (x86_64) - Amazon Linux 2023, Fedora, RHEL
sudo dnf install -y https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator-x86_64.rpm

# Debian/Ubuntu (amd64)
curl -fsSLo aws-emulator.deb https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator_amd64.deb
sudo apt-get install -y ./aws-emulator.deb

# Confirm
aws-emulator -v

Swap in aws-emulator-aarch64.rpm or aws-emulator_arm64.deb on Arm hosts. Each package has a .sig file next to it, and the guide walks through verifying it with GnuPG against AWS's published key fingerprint. It's worth doing on build agents.

Start it in the foreground:

aws-emulator --telemetry off

The first JSON log line with "message": "emulator server information" tells you everything a script needs: endpoint_url, health_check_url, config_file, ca_file and java_truststore_file. The emulator writes its per-run credentials, an SDK config file and its certificate to ~/.aws/emulator/9297/ (the directory is named after the port) and deletes them on a clean stop (Ctrl+C, SIGTERM or idle timeout).

Useful flags from the command reference:

Flag Default Use it for
-p, --port 9297 Parallel emulators; -p 0 picks a free port (read it from endpoint_url)
-b, --bind 127.0.0.1 Only change inside a container
-a, --auth on off skips SigV4 checks; avoid unless you understand the risk
-t, --telemetry on off for CI
--idle-timeout none Auto-stop after N seconds with no API calls, so CI never leaks a process

Building from source is also Linux-only, and the README warns that you need Rust, a C compiler, a multi-core machine and at least 100 GB of free disk for target/. Most people should use the package.

Run AWS Emulator in Docker on macOS and Windows

AWS does not publish a prebuilt image. The Docker guide gives you a short Dockerfile that installs the RPM on Amazon Linux 2023:

FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal
ADD https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator-x86_64.rpm /tmp/aws-emulator.rpm
RUN rpm -i /tmp/aws-emulator.rpm && rm /tmp/aws-emulator.rpm \
    && mkdir -p /home/emulator && chown 1000 /home/emulator
USER 1000
ENV HOME=/home/emulator EMULATOR_BIND_ADDRESS=0.0.0.0
ENTRYPOINT ["aws-emulator"]

On Apple silicon, replace aws-emulator-x86_64.rpm with aws-emulator-aarch64.rpm. Then build and run:

docker build -t aws-emulator .
mkdir -p ~/.aws/emulator

PORT=9297
docker run --rm --memory=2g --memory-swap=2g -p 127.0.0.1:$PORT:$PORT \
  -e HOME="$HOME" -v "$HOME/.aws/emulator:$HOME/.aws/emulator" \
  aws-emulator -p $PORT

Three details from the guide are easy to get wrong:

  1. Publish on 127.0.0.1. A bare -p 9297:9297 exposes the emulator to your whole network.
  2. Mount ~/.aws/emulator. That's how your host SDK reads the per-run credentials and ca.pem. Passing -e HOME="$HOME" makes the paths inside the container match your host on macOS and Linux.
  3. Change the port in all three places (both sides of Docker's -p and the emulator's -p) if you run several containers. Otherwise they overwrite each other's credential files.

The --memory=2g cap matters because all state is in memory. If the container exceeds it, Docker kills it with exit code 137 and your emulated resources are gone. The docs list about 160 MiB idle as a baseline.

Point the AWS CLI, boto3 and SDK v3 at the emulator

You don't change application code. You change the environment. These are the variables from the SDK configuration page:

export AWS_ENDPOINT_URL=https://127.0.0.1:9297
export AWS_SHARED_CREDENTIALS_FILE=~/.aws/emulator/9297/emulator_credentials
export AWS_CONFIG_FILE=~/.aws/emulator/9297/config
export AWS_CA_BUNDLE=~/.aws/emulator/9297/ca.pem
export AWS_EC2_METADATA_DISABLED=true
export AWS_DISABLE_HOST_PREFIX_INJECTION=true
export AWS_REGION=us-east-1
export AWS_DEFAULT_REGION=us-east-1

# Real credentials in env vars win over the credentials file - remove them
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILE

# Prove you are talking to the emulator, not your account
aws sts get-caller-identity

If you see "Account": "000000000000" and arn:aws:iam::000000000000:user/emulator, you're on the emulator. If you see your own account ID, stop. Your tests are hitting AWS.

A few SDK-specific gotchas:

  • Keep 127.0.0.1, not localhost. Because the endpoint is an IP address, SDKs use path-style S3 requests, and the emulator only accepts path-style. With localhost, the JavaScript, Java and Go SDKs switch to virtual-hosted bucket names and the requests miss the emulator.
  • Host prefixes. Operations such as Step Functions StartSyncExecution or CloudWatch Logs StartLiveTail prepend sync- or stream- to the hostname. AWS_DISABLE_HOST_PREFIX_INJECTION fixes this for the CLI and boto3, but don't leave it set in shells that talk to real AWS.
  • S3 Control never works, because SDKs always put the account ID in its hostname.
  • Certificates. The CLI, boto3 and Go v2 read AWS_CA_BUNDLE. Node.js needs NODE_EXTRA_CA_CERTS, Rust and .NET need SSL_CERT_FILE, and Java needs JAVA_TOOL_OPTIONS pointing at the generated truststore.p12.

With the environment set, boto3 needs nothing special:

import boto3

s3 = boto3.client("s3")
s3.create_bucket(Bucket="demo-bucket")
print([b["Name"] for b in s3.list_buckets()["Buckets"]])

For the JavaScript SDK v3, add the CA and turn off host prefixes on the client:

export NODE_EXTRA_CA_CERTS=~/.aws/emulator/9297/ca.pem
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";

// Endpoint, region and credentials come from the environment variables above
const s3 = new S3Client({ disableHostPrefix: true });
const { Buckets } = await s3.send(new ListBucketsCommand({}));
console.log(Buckets?.map((b) => b.Name));

NODE_EXTRA_CA_CERTS adds to Node's trust store instead of replacing it, so the same process can still reach real HTTPS endpoints. AWS_CA_BUNDLE and the Java trust store replace the defaults, so mixed-traffic processes need a combined bundle.

A pytest fixture for AWS Emulator integration tests

The pattern that holds up best: let the test session start its own emulator on a free port, read the startup line, set the environment, assert the account ID, and stop the process at the end. That gives you a clean, isolated emulator per run and a hard guard against accidentally calling AWS.

# conftest.py
import json
import os
import pathlib
import subprocess
import time

import boto3
import pytest

EMULATOR_VARS = (
    "AWS_ENDPOINT_URL", "AWS_CONFIG_FILE", "AWS_SHARED_CREDENTIALS_FILE",
    "AWS_CA_BUNDLE", "AWS_EC2_METADATA_DISABLED",
    "AWS_DISABLE_HOST_PREFIX_INJECTION", "AWS_REGION", "AWS_DEFAULT_REGION",
)
REAL_CREDS = ("AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_PROFILE")


def _startup_info(log_path, timeout=30):
    deadline = time.time() + timeout
    while time.time() < deadline:
        for line in log_path.read_text().splitlines():
            try:
                rec = json.loads(line)
            except json.JSONDecodeError:
                continue  # stderr telemetry notice is plain text
            if rec.get("message") == "emulator server information":
                return rec.get("fields", rec)
        time.sleep(0.2)
    raise RuntimeError(f"AWS Emulator did not start; see {log_path}")


@pytest.fixture(scope="session")
def aws_emulator(tmp_path_factory):
    log_path = tmp_path_factory.mktemp("emulator") / "emulator.log"
    with open(log_path, "w") as log:
        proc = subprocess.Popen(
            ["aws-emulator", "-p", "0", "--telemetry", "off", "--idle-timeout", "900"],
            stdout=log, stderr=subprocess.STDOUT,
        )
    saved = {k: os.environ.get(k) for k in EMULATOR_VARS + REAL_CREDS}
    try:
        info = _startup_info(log_path)
        run_dir = pathlib.Path(info["config_file"]).parent
        for k in REAL_CREDS:
            os.environ.pop(k, None)
        os.environ.update({
            "AWS_ENDPOINT_URL": info["endpoint_url"],
            "AWS_CONFIG_FILE": info["config_file"],
            "AWS_SHARED_CREDENTIALS_FILE": str(run_dir / "emulator_credentials"),
            "AWS_CA_BUNDLE": info["ca_file"],
            "AWS_EC2_METADATA_DISABLED": "true",
            "AWS_DISABLE_HOST_PREFIX_INJECTION": "true",
            "AWS_REGION": "us-east-1",
            "AWS_DEFAULT_REGION": "us-east-1",
        })
        account = boto3.client("sts").get_caller_identity()["Account"]
        assert account == "000000000000", "refusing to run tests against a real AWS account"
        yield info["endpoint_url"]
    finally:
        proc.terminate()  # SIGTERM = clean stop, files in ~/.aws/emulator/<port> are removed
        proc.wait(timeout=30)
        for k, v in saved.items():
            if v is None:
                os.environ.pop(k, None)
            else:
                os.environ[k] = v

And the tests themselves. The second test is the useful kind: it asserts on the exact validation error AWS returns, which the docs use as their own fidelity example.

# test_storage.py
import uuid

import boto3
import pytest
from botocore.exceptions import ClientError


def test_s3_round_trip(aws_emulator):
    s3 = boto3.client("s3")
    bucket = f"test-{uuid.uuid4().hex[:12]}"
    s3.create_bucket(Bucket=bucket)
    s3.put_object(Bucket=bucket, Key="hello.txt", Body=b"hi")
    body = s3.get_object(Bucket=bucket, Key="hello.txt")["Body"].read()
    assert body == b"hi"


def test_dynamodb_rejects_short_table_name(aws_emulator):
    ddb = boto3.client("dynamodb")
    with pytest.raises(ClientError) as err:
        ddb.create_table(
            TableName="ab",
            AttributeDefinitions=[{"AttributeName": "id", "AttributeType": "S"}],
            KeySchema=[{"AttributeName": "id", "KeyType": "HASH"}],
            BillingMode="PAY_PER_REQUEST",
        )
    assert err.value.response["Error"]["Code"] == "ValidationException"

Because state is shared across the session, generate unique resource names (as above) or switch the fixture to scope="function" when tests need an empty account. Startup is fast enough that per-module emulators are usually fine.

Running AWS Emulator in CI (GitHub Actions)

On a Linux runner, install the package and let the pytest fixture manage the process:

# .github/workflows/integration.yml
name: integration
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    env:
      EMULATOR_TELEMETRY: "off"
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Install AWS Emulator
        run: |
          curl -fsSLo aws-emulator.deb https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator_amd64.deb
          sudo apt-get install -y ./aws-emulator.deb
          aws-emulator -v
      - run: pip install boto3 pytest
      - run: pytest -q

If your tests don't manage the process, start it in the background with --idle-timeout and wait on the health route before running tests:

aws-emulator --idle-timeout 1800 > emulator.log 2>&1 &
for i in $(seq 30); do
  curl -sf --cacert ~/.aws/emulator/9297/ca.pem https://127.0.0.1:9297/__admin/health && break
  sleep 1
done

Two CI rules worth enforcing: never give the test job real AWS credentials, and always assert the 000000000000 account before running anything. If you also deploy from the same pipeline, keep real credentials in a separate job that uses short-lived OIDC credentials, as described in our GitHub Actions OIDC guide for AWS, GCP and Azure. The emulator's log lines are JSON, so piping a failed run's emulator.log through a JSON formatter makes the failing request easy to find.

Rust projects have a third option: embedded mode. Add aws-emulator-embedded as a git dev-dependency pinned to a release commit, create AwsEmulatorEmbedded::new(EmbeddedOptions::default()) per test, and pass emulator.http_client() and emulator.aws_credentials_provider() into your aws_config builder. Each test gets isolated state, no ports, no certificates. Expect the first cargo test to be slow while the service crates compile, and cache target/ in CI.

How to check whether your workflow is covered

AWS publishes fidelity tests: short SDK programs verified against real AWS. A service's score is the number of those tests the emulator passes, and AWS says it publishes scores with each release on the releases page. The docs say coverage is strongest on control-plane APIs (create, describe, list, delete). Data-plane behavior and CloudFormation, Terraform and CDK support vary by service. Unimplemented operations fail fast with HTTP 501 NotImplemented.

A practical check before you adopt it:

  1. List the AWS operations your code calls (CloudTrail from a staging account is a good source).
  2. Look them up in manifest.jsonl in the evaluation-suite repo.
  3. For anything uncovered, run the same test against the emulator and a sandbox account and diff the results.

The aws-emulator agent skill (installed with aws agent-toolkit add-skill --skill-name aws-emulator, AWS CLI 2.35.0+) automates this for AI coding agents, but the manual route works fine.

AWS Emulator vs LocalStack vs moto vs Floci

AWS Emulator LocalStack for AWS moto Floci
Maintainer AWS LocalStack (company) Open-source community Open-source community
License / access CC0-1.0, no account Current image needs an auth token; free Hobby plan is non-commercial Apache-2.0 MIT, no token
How it runs Native Linux package, Docker (build your own), Rust embedded Docker container In-process @mock_aws decorator or moto_server Docker container
Default endpoint https://127.0.0.1:9297 Port 4566 Port 5000 (server mode) Port 4566
Coverage source Generated from AWS Smithy models, published fidelity scores Per-plan service list Hand-written mocks 51 services per README
SigV4 enforced Yes, by default Not covered here No Not covered here
IAM policy evaluation No (documented) Not covered here Not covered here Not covered here
State persistence In memory only Not on Hobby plan In memory Not covered here

On licensing: LocalStack announced in early 2026 that Community and Pro would merge into one image that requires an auth token. The old Community code stays on GitHub under Apache-2.0 but no longer gets updates. Its licensing page now lists a Hobby plan for non-commercial use, alongside paid Base, Ultimate and Enterprise plans. That change is the main reason AWS Emulator, Floci and similar projects got so much attention this year.

How to choose:

  • Python unit tests that mock one or two services: moto's in-process @mock_aws is still the fastest feedback loop, with no ports or certificates.
  • Multi-service integration tests in CI, free for commercial use: AWS Emulator. The SigV4 enforcement and the 000000000000 account check make it hard to hit production by mistake.
  • You rely on LocalStack-specific features (Cloud Pods, its IaC integrations, IAM enforcement on paid plans): staying on LocalStack with a token is the least disruptive path.
  • Drop-in LocalStack replacement on port 4566: Floci and similar projects aim for that, but check their service lists against your stack.

None of these replace a real AWS sandbox for IAM, networking, quotas or performance. Run a smaller suite against a disposable account before you ship. That's where services such as Lambda durable functions or S3 Vectors need verification, because brand-new APIs are where any emulator's fidelity is lowest.

Frequently Asked Questions

Is AWS Emulator free?

Yes. AWS lists no service fee, and you don't need an AWS account. The code is CC0-1.0, with Apache-2.0 for vendored framework crates. Telemetry is on by default. Turn it off with --telemetry off, EMULATOR_TELEMETRY=off or enabled = false under [telemetry] in ~/.aws/emulator/config.toml.

Does AWS Emulator run on macOS or Windows?

Only through Docker. Native packages and source builds are Linux-only (x86_64 and aarch64). On macOS and Windows you build the image from AWS's Dockerfile and run it with the port published on 127.0.0.1.

What port does AWS Emulator use?

HTTPS on 127.0.0.1:9297 by default. Use -p <port> to change it or -p 0 for a random free port, which the startup log line reports in endpoint_url. The credentials, config and certificate files are written to ~/.aws/emulator/<port>/.

Can AWS Emulator replace LocalStack?

For many CI integration suites, yes, especially if the LocalStack token requirement is a problem. It is not a drop-in swap. The port, certificate handling and auth model differ, and IAM policy testing and some IaC workflows aren't covered. Compare fidelity scores for the services you use first.

Why does my request fail with AccessDenied or UnknownService?

The emulator enforces SigV4 with keys generated for the current run. If real AWS_ACCESS_KEY_ID variables are still set, they take precedence over the emulator's credentials file and get rejected. Unset them, point AWS_SHARED_CREDENTIALS_FILE at ~/.aws/emulator/<port>/emulator_credentials, and restart your shell session if you restarted the emulator.

Bottom Line

AWS Emulator is the first local AWS stand-in that comes from AWS itself, is built from AWS's own API models, and publishes measured fidelity. For functional integration tests in CI it's a strong default: install the package, let a fixture start it on a random port, assert the 000000000000 account, and tear it down. Treat its gaps as documented. There's no IAM policy evaluation, state lives only in memory, and data-plane fidelity varies by service. Keep a thin suite running against a real sandbox account for everything the emulator can't prove.