
Using AWS Emulator on a real project
On 11 November 2026, AWS released AWS Emulator. It runs AWS application programming interfaces (APIs) on your own computer. You need no AWS account.
AWS launched AWS Emulator today and I had a project that could use it. So, I tried AWS Emulator with my project right away. AirShonket is a public air quality map of Bangladesh that I run on AWS. Its Lambda function had no tests in the repository. So I spent the day running AirShonket against the emulator, and I wrote down everything that worked and everything that did not.
The short version: simple services such as Amazon S3, Amazon DynamoDB and Amazon SQS worked well and were fast. The tests for my Lambda handler passed in about 0.2 seconds. My CDK deploy and any Lambda function that calls other AWS services did not work yet.
My setup was an Apple silicon Mac with Docker 29.5, AWS CLI 2.40.1 and Python 3.13. I used AWS Emulator 1.0.322.
What AWS Emulator is
AWS Emulator is a local server that answers AWS API calls. Your software development kit (SDK) or the AWS CLI talks to it instead of AWS.

Here is what I confirmed from the documentation and my own runs:
- One endpoint. Every service uses
https://127.0.0.1:9297by default.
- Real checks. It validates requests and returns AWS-style errors. It also needs requests signed with Signature Version 4 (SigV4).
- New keys each start. It creates new credentials and a new certificate every time it starts. Keys from one run do not work in the next.
- State in memory. When you stop it, it deletes your resources.
- Built from the AWS API models. These are the same models behind the AWS SDKs. An operation that is not built yet returns HTTP 501 with the code
NotImplemented.
- Open source. The code is in Rust, on GitHub , under the CC0 licence.
- For development and testing only. AWS gives no durability, availability or security guarantees.
AWS says autonomous AI agents wrote every line of the code. The launch post says people built the system that runs the agents, and did not write or review the emulator code. I did not check that claim. What I can check is the output, and AWS publishes fidelity tests so that you can check it too.
Four ways to run it
Way | Where it runs | Did I try it? |
|---|---|---|
Linux package ( .rpm or .deb ) | Linux on x86_64 or Arm | Yes, in an Ubuntu container |
Docker | macOS, Windows, Linux | Yes |
Embedded mode | Inside Rust tests | No |
AI coding agent skill | Kiro, Cursor, Claude Code | No |
The guide says the agent skill needs AWS CLI 2.35.0 or later. You install it with
aws agent-toolkit add-skill --skill-name aws-emulator --region us-east-1 . I did not run it.Getting it running
I ran the AWS CLI and Python inside containers that share the emulator's network. The commands below use plain
aws to keep them short. I checked the emulator from my Mac with curl . I did not run the AWS CLI directly on my Mac.Building the image
AWS does not publish a ready-made image, so I built one from the Linux package. This is the Dockerfile in my AirShonket repository . It works on Intel and Arm, because
uname -m returns the name that the package files use.FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimalARG EMULATOR_VERSION=1.0.322RUN rpm -i "https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/aws-emulator-${EMULATOR_VERSION}-1-$(uname -m).rpm" \ && mkdir -p /home/emulator/.aws/emulator && chown -R 1000 /home/emulatorUSER 1000ENV HOME=/home/emulatorEXPOSE 9297ENTRYPOINT ["aws-emulator"]CMD ["-b", "0.0.0.0", "-p", "9297", "--telemetry", "off"]I built it and checked the version:
docker build -t aws-emulator .docker run --rm aws-emulator -vVersion: 1.0.322Release date: 2026.11.10Commit: 7753983c6e495ec3612695b1336bf4936fc7b7fdThe build took about 40 seconds. The image is large: 1.63 GB on my machine.
Starting it
I started it like this:
mkdir -p ~/.aws/emulatordocker run -d --name emu --memory=2g --memory-swap=2g \ -p 127.0.0.1:9297:9297 \ -e HOME="$HOME" -v "$HOME/.aws/emulator:$HOME/.aws/emulator" \ aws-emulator -b 0.0.0.0 -p 9297 --telemetry offThree details are worth knowing:
- Bind to 127.0.0.1. Write
127.0.0.1:9297:9297, not9297:9297. The second form opens the emulator to your network.
- Share the folder. The emulator writes its keys and certificate to
~/.aws/emulator/9297/. The mount lets your tools read them.
- Telemetry is on by default. It sends usage counts and error types to AWS. It does not send request content, resource names or credentials, according to the telemetry page . I turned it off with
--telemetry off.
Then I checked that it was healthy:
curl --cacert ~/.aws/emulator/9297/ca.pem https://127.0.0.1:9297/__admin/healthokIn the logs, the server was ready 43 milliseconds after it started. The first health check passed within half a second of the
docker run command. After the tests, memory use was about 197 MiB.Connecting my tools
I set these variables in the shell where I run my commands:
export AWS_ENDPOINT_URL=https://127.0.0.1:9297export AWS_SHARED_CREDENTIALS_FILE=~/.aws/emulator/9297/emulator_credentialsexport AWS_CONFIG_FILE=~/.aws/emulator/9297/configexport AWS_CA_BUNDLE=~/.aws/emulator/9297/ca.pemexport AWS_EC2_METADATA_DISABLED=trueexport AWS_DISABLE_HOST_PREFIX_INJECTION=trueexport AWS_REGION=us-east-1export AWS_DEFAULT_REGION=us-east-1unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AWS_PROFILEThen I checked who I was:
aws sts get-caller-identity{ "UserId": "AIDAH5I7GEMO7ADXNFAZU", "Account": "000000000000", "Arn": "arn:aws:iam::000000000000:user/emulator"}Account
000000000000 means I was talking to the emulator.Warning: IfAWS_ENDPOINT_URLis not set, your code calls real AWS. Add a check to your tests. The AirShonket tests below refuse to run unless the endpoint starts withhttps://127.0.0.1:.
A few notes from the guide:
- Why host prefix injection is off. Some SDK calls add a prefix to the host name. For example, Step Functions
StartSyncExecutionusessync-. The emulator has one host name, so you turn the prefix off. Do not leave this variable set when you use real AWS.
- Use
127.0.0.1. Do not uselocalhost. S3 then puts the bucket name in the path, which the emulator expects.
- Other languages. The AWS CLI, boto3 and the Go SDK read
AWS_CA_BUNDLE. Node.js needsNODE_EXTRA_CA_CERTS. Rust and .NET needSSL_CERT_FILE. Java needs the generatedtruststore.p12. I tested only the AWS CLI and Python.
The simple services first
Amazon S3
I started with the bucket name from the emulator's own guide:
aws s3api create-bucket --bucket amzn-s3-demo-bucketAn error occurred (InvalidBucketName) when calling the CreateBucket operation: The specified bucket is not valid.This looked like a bug. It is not. S3 reserves the prefix
amzn-s3-demo- , so real S3 refuses this name too. The guide shows this name working, so the guide is out of date for version 1.0.322. I did not try the name on real S3.With a different name, S3 worked:
aws s3api create-bucket --bucket builder-demo-bucketecho "hello emulator" > hello.txtaws s3 cp hello.txt s3://builder-demo-bucket/hello.txtaws s3 cp s3://builder-demo-bucket/hello.txt -curl --cacert "$AWS_CA_BUNDLE" "$(aws s3 presign s3://builder-demo-bucket/hello.txt --expires-in 60)"{ "Location": "/builder-demo-bucket", "BucketArn": "arn:aws:s3:::builder-demo-bucket" }hello emulatorhello emulatorThe last command shows that presigned URLs work.
Amazon DynamoDB
The emulator checked input the way DynamoDB does. A table name with 2 characters failed:
aws dynamodb create-table --table-name ab \ --attribute-definitions AttributeName=pk,AttributeType=S \ --key-schema AttributeName=pk,KeyType=HASH --billing-mode PAY_PER_REQUESTValidationException: 1 validation error detected: Value 'ab' at 'tableName' failed to satisfy constraint: Member must have length greater than or equal to 3A valid table started in the
CREATING state, so an early write failed:aws dynamodb create-table --table-name orders \ --attribute-definitions AttributeName=pk,AttributeType=S \ --key-schema AttributeName=pk,KeyType=HASH --billing-mode PAY_PER_REQUEST \ --query TableDescription.TableStatusaws dynamodb put-item --table-name orders --item '{"pk":{"S":"order#1"},"total":{"N":"42.50"}}'"CREATING"ResourceNotFoundException: Requested resource not foundThe table became
ACTIVE after about 3 seconds. I waited for it, then tried a conditional write:aws dynamodb wait table-exists --table-name ordersaws dynamodb put-item --table-name orders --item '{"pk":{"S":"order#1"},"total":{"N":"42.50"}}'aws dynamodb put-item --table-name orders --item '{"pk":{"S":"order#1"},"total":{"N":"1"}}' \ --condition-expression 'attribute_not_exists(pk)'aws dynamodb get-item --table-name orders --key '{"pk":{"S":"order#1"}}'ConditionalCheckFailedException: The conditional request failed{ "Item": { "total": { "N": "42.5" }, "pk": { "S": "order#1" } } }The second write failed, as it should. The number
42.50 came back as 42.5 .If you create a table in every test, you pay about 3 seconds each time. Create tables once per test run instead.
Amazon SQS
Q=$(aws sqs create-queue --queue-name jobs --query QueueUrl --output text)aws sqs send-message --queue-url "$Q" --message-body '{"job":1}'aws sqs receive-message --queue-url "$Q" --query 'Messages[0].Body'"{\"job\":1}"How fast is it?
I made 200 calls of each kind from a Python client in a container on the emulator's network:
Call | Average time |
|---|---|
S3 PutObject (1 KiB) | 1.04 ms |
DynamoDB PutItem | 0.75 ms |
DynamoDB CreateTable returns | 5.3 ms |
These numbers come from one machine. Use them as a rough guide only.
Two emulators at once
Each emulator has its own port, keys and state, which helps when tests run in parallel. I started a second one on port 9298:
docker run -d --name emu2 --memory=2g --memory-swap=2g \ -p 127.0.0.1:9298:9298 \ -e HOME="$HOME" -v "$HOME/.aws/emulator:$HOME/.aws/emulator" \ aws-emulator -b 0.0.0.0 -p 9298 --telemetry offI pointed a second shell at it, using the same variables with
9298 in place of 9297 , and listed the buckets in both:emulator on 9297: builder-demo-bucket, lat-probeemulator on 9298: (empty)The keys from the first emulator did not work on the second:
AccessDenied: Sign the request with the emulator credentialsTesting AirShonket
AirShonket shows air quality across Bangladesh. An Amazon EventBridge rule starts a Python Lambda function every 30 minutes. The function does three things:
- It reads the list of air quality stations from my S3 bucket.
- It reads the latest PM2.5 value (fine particles in the air) for each station. The data comes from the public archive of OpenAQ, an open air quality data project, on S3. The function uses an unsigned request for this.
- It writes
latest_pm25.geojsonfor the map. It also writes a dated snapshot in newline-delimited JSON (NDJSON) for later analysis.
The repository had no tests for this function.
I added tests that run the handler against AWS Emulator. The change is only tooling and tests. I did not change
handler.py or the AWS Cloud Development Kit (CDK) stack. The work is in two pull requests: #1 and #2 .Path in the repository | What it does |
|---|---|
emulator/Dockerfile | Builds the emulator image |
compose.yml | Runs the emulator and a test container together |
Makefile | Adds emu-up , emu-test and emu-down |
pipeline/tests/ | Holds the tests, a fixture of 4 stations and the Python requirements |
emulator/README.md | Explains the setup and the known differences from AWS |
Run it yourself:
git clone https://github.com/SumonMSelim/airshonket.gitcd airshonketmake emu-upmake emu-testmake emu-downtest_ingest.py::test_latest_geojson_has_only_stations_with_valid_readings PASSED [ 33%]test_ingest.py::test_snapshot_is_dated_ndjson PASSED [ 66%]test_ingest.py::test_missing_station_list_fails_loudly PASSED [100%]
============================== 3 passed in 0.22s ===============================I ran these commands from a fresh clone of
main . Three tests ran in 0.22 seconds.

What the tests check
The tests seed the emulator with synthetic OpenAQ files. The files use the same key layout as the real archive. Each file covers one edge case:
- Dhaka University. It has several readings. One
pm25value is 1500, which is out of range, so the handler must skip it. Apm10row must be ignored.
- US Diplomatic Post, Dhaka. It has no file from two days ago. The handler must fall back to the file from three days ago.
- A third station. Its file is not valid gzip. The handler must skip it and finish the run.
The main test checks the values and the object metadata:
def test_latest_geojson_has_only_stations_with_valid_readings(ingest, archive): handler, bucket = ingest result = handler.handler({}, None)
assert result["stations_total"] == len(archive) == 4 assert result["readings_written"] == 2 obj, body = read(bucket, "data/latest_pm25.geojson") assert obj["ContentType"] == "application/geo+json" assert obj["CacheControl"] == "public, max-age=300" geo = json.loads(body) by_id = {f["properties"]["location_id"]: f for f in geo["features"]} assert by_id[22]["properties"]["pm25"] == 87.2 # latest in-range pm25, rounded assert by_id[2445]["properties"]["pm25"] == 112.4 # fell back to an older dayThese checks use the emulator's real S3 behaviour. The
ContentType and CacheControl values come back from S3, not from a mock.A mistake I made
My first version of the tests read
data/bd_stations.json . That file is generated and git-ignored, so it was only on my computer. On a fresh clone, the tests failed with FileNotFoundError . I found this only because I tested a fresh clone after merging. The fix was a small tracked fixture with 4 stations (pull request #2).If you share tests with a project, test a fresh clone. It takes 1 minute.
Where the emulator stops: anonymous reads
The handler reads the OpenAQ bucket without signing the request. Against the emulator, this fails:
AccessDenied: An error occurred (AccessDenied) when calling the GetObject operation: Access DeniedI also tried
--auth off . The anonymous read still failed. The guide says the emulator does not evaluate bucket policies, so I could not make a local bucket public. I did not test a public bucket policy.The test swaps the handler's unsigned client for the signed one. This is the only difference from production:
monkeypatch.setattr(handler, "_s3_public", handler._s3)If your code depends on who can read what, the emulator cannot test it.
Trying my own deploy tools
The tests above are code I wrote. I also wanted to know if the repository's existing tools work against the emulator. I ran them on a copy of the repository, inside Docker. The copy used only the emulator's credentials.
Warning: AirShonket'sinfra-cdk/deploy.shnames a real AWS profile and account. I did not run it. Read a deploy script before you point it at anything, and make sure it cannot reach your real account.
The shell scripts worked unchanged
AWS_REGION=us-east-1 SUFFIX=emu bash infra/20_data_bucket.shAWS_REGION=us-east-1 SUFFIX=emu bash infra/30_lambda.shThe emulator accepted everything the scripts did. That included the bucket and its public access block, and three uploads with content types and cache headers. It also included an IAM role with a policy, the Lambda function, the EventBridge rule and the rule target. The Lambda script needs the
zip command.One more thing happened. On a first attempt, the function already existed. The script called
update-function-code and then update-function-configuration straight away. The second call failed with ResourceConflictException , because the first update was still running. Real Lambda also does this when you do not wait between updates.The CDK stack got most of the way
I ran these steps on the copy:
npx cdk bootstrap aws://000000000000/us-east-1npx cdk deploycdk synth worked. cdk bootstrap created all 15 resources. cdk deploy then stopped in four steps:-
Unrecognized resource types: [AWS::Location::APIKey]. CloudFormation in the emulator does not know the Amazon Location map key. This is the only unsupported type in the stack. I removed it from the copy to continue.
- A name clash. The function
airshonket-ingestalready existed, because my shell script had created it. The repository has two deploy paths, and both use fixed names. They cannot share an account without clean-up. I did not know this before.
- A second name clash. The log group
/aws/lambda/airshonket-ingestalready existed. I deleted it.
- A timeout. After clean-up, most resources were created: the bucket, the CloudFront distribution, the IAM roles, the Lambda function and the EventBridge rule. The stack then failed at
Custom::CDKBucketDeployment. This helper is a Lambda function that copies the site files into S3, so it has to call S3 from inside the emulator. CloudFormation timed out, and the rollback ended inROLLBACK_FAILED.
For this stack, CDK checks your template and creates most resources. It cannot finish a deploy that needs a Lambda function to call other AWS services.
Lambda inside the emulator
A Lambda function that does not call other services ran well. This is the small one I used:
# app.pydef handler(event, context): return {"echo": event, "function": context.function_name}zip function.zip app.pyaws iam create-role --role-name demo-role \ --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"},"Action":"sts:AssumeRole"}]}'aws lambda create-function --function-name echo --runtime python3.13 --handler app.handler \ --role arn:aws:iam::000000000000:role/demo-role --zip-file fileb://function.zipaws lambda wait function-active-v2 --function-name echoaws lambda invoke --function-name echo --cli-binary-format raw-in-base64-out \ --payload '{"hi":1}' out.jsoncat out.json{"echo": {"hi": 1}, "function": "echo"}The AirShonket handler is different. It calls S3, and it failed when I invoked it in the emulator:
Unable to import module 'handler': cannot import name 'UNSIGNED' from 'botocore' (unknown location)To find out why, I deployed a small probe function. It showed three differences from real Lambda in version 1.0.322:
-
boto3andbotocoreimport without an error, but they are empty. They have no__version__and noUNSIGNED.
- A function created with the
python3.12runtime reported Python3.14.0.alpha.
- The function has no access keys and no
AWS_ENDPOINT_URL. Even with boto3 in the package, it could not call back into the emulator.
So a function can run, but it cannot use other AWS services. This is why I test the AirShonket handler in the test process and not as a deployed function.
The emulator's issue list has an entry from 22 October 2026 that says
Invoke returned NotImplemented . In version 1.0.322, Invoke worked for my functions. The entry looks out of date, and this area is changing fast.The EventBridge schedule works
I created a rule with
rate(1 minute) that targets a function made from the AirShonket handler. Then I counted the REPORT lines in its logs:20 seconds 4 lines (1 direct invoke + the first scheduled run and 2 more)80 seconds 7 lines140 seconds 10 linesThe schedule fires. The count rose by 3 every minute. That fits one scheduled run plus 2 retries, which is how Lambda treats a failed asynchronous call. I did not check the retry setting, so this is my reading.
My first test used a probe function and showed no logs, and I wrongly said I could not tell if the rule fired. That function's role had no logging policy. Functions whose role had
AWSLambdaBasicExecutionRole did write logs. I did not test whether the policy is the cause. The lesson is to test with a function that writes logs, and then read them.

Running it in CI
On Linux you do not need Docker. You can install the package and start the binary.
I ran these steps in a clean Ubuntu 24.04 container: install the package, start the emulator, wait for the health check, and run the AirShonket tests. The tests passed (3 passed in 0.18 seconds). I did not run the workflow on GitHub Actions itself.
name: testson: [push, pull_request]
jobs: emulator-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Install AWS Emulator run: | curl -fsSLo aws-emulator.deb "https://downloads.aws.com/aws-emulator/packages/aws-emulator/LTS/latest/aws-emulator_$(dpkg --print-architecture).deb" sudo apt-get install -y ./aws-emulator.deb
- name: Start AWS Emulator run: | aws-emulator --telemetry off --idle-timeout 900 & 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
- name: Run tests run: | pip install -r pipeline/tests/requirements.txt export AWS_ENDPOINT_URL=https://127.0.0.1:9297 export AWS_SHARED_CREDENTIALS_FILE=$HOME/.aws/emulator/9297/emulator_credentials export AWS_CONFIG_FILE=$HOME/.aws/emulator/9297/config export AWS_CA_BUNDLE=$HOME/.aws/emulator/9297/ca.pem export AWS_EC2_METADATA_DISABLED=true AWS_DISABLE_HOST_PREFIX_INJECTION=true AWS_REGION=us-east-1 export PYTHONPATH=pipeline/lambda STATIONS_FILE=pipeline/tests/fixtures/stations.json pytest pipeline/testsYou need no repository secrets, no IAM roles for CI and no test account.
Two tips:
- Pin the version. The command above downloads
latest. A new release can fix a response so that it matches AWS, and a test that relied on the old response can then fail. The versioning page lists the pinned download paths.
- Use
--idle-timeout. It stops the emulator after the given number of seconds without an API call.
Limits to know
Limit | Source |
|---|---|
It does not evaluate IAM policies or resource policies. It never denies a request signed with its own key. Do not use it to test security. | Guide |
One account ( 000000000000 ) and one Region per emulator. It accepts any Region in a request but keeps no separate resources per Region. | Guide |
State is in memory. AWS has not tested it for long runs or load tests. | Guide |
Fidelity differs by service. It is closest for control plane APIs. Data plane and infrastructure as code support vary. | Guide |
S3 Control requests do not reach it, because the account ID goes in the host name. I got Could not connect to the endpoint URL . | Guide and my test |
The native binary runs on Linux only. On macOS and Windows you use Docker. | Guide |
Lambda functions cannot call other AWS services in version 1.0.322. | My tests |
CDK or CloudFormation stacks that need an unsupported resource type, or a Lambda that calls a service, do not deploy. | My tests |
Telemetry is on by default. You can turn it off with --telemetry off , EMULATOR_TELEMETRY=off or a config file. | Guide |
Some resources, such as databases, get their own port on 127.0.0.1 . Those ports do not check signatures. Do not share the machine or expose the ports. | Guide |
It ships many times a day. Security fixes go only into the latest release. | Guide |
AWS also says to report differences from real AWS as GitHub issues . The repository does not take pull requests.
Clean up
docker rm -f emu emu2rm -rf ~/.aws/emulatorFor the AirShonket repository, run
make emu-down .My verdict
I would use it. This is my view after one day:
- It is fast. The server starts in a fraction of a second. Calls take about 1 millisecond. The AirShonket handler tests take 0.22 seconds.
- It behaves like AWS in small ways that matter. It rejected a reserved bucket name, a short table name and an early write to a table that was still being created. A mock would have accepted all three.
- Testing a real project taught me more than the examples. I found that the two deploy paths in my repository clash, and that Lambda functions cannot call other services yet.
- I still need real AWS. I need it for IAM, for Lambda functions that call other services, for the CDK deploy and for anonymous reads.
- It is new. AWS released it on the day I tested it, and one example in its own guide was already out of date. Pin the version, and read the release notes before you upgrade.
If your tests use S3, DynamoDB or SQS, try it now. If your code depends on IAM, or on Lambda functions that call other services, test your own case first, and use the checks above.
Next steps
- Read the AWS Emulator user guide .
- Check the fidelity page and the per-service scores in the release notes .
- Use the
aws-emulatorskill to map the operations in your own project to the fidelity tests.
- Look at the AirShonket repository and copy the
emulator/folder,compose.ymlandMakefile.
- Read AWS Emulator and the engineer's job when agents write the code by Werner Vogels.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article