aiomoto
Moto-style AWS service mocks for aiobotocore
What it is and what it does
aiomoto is a testing library that extends Moto's AWS service mocking to work with async code. It lets you write tests that use both synchronous botocore clients and asynchronous aiobotocore clients against the same in-memory mock backend in a single process. This solves the problem of testing async AWS code without either spinning up a real AWS environment or running a separate Moto server.
The library wraps Moto's stubber to make it work with async contexts and decorators. It actively supports S3 (CRUD, listings, streaming), DynamoDB, Secrets Manager, SES, SNS, SQS, KMS, STS, Lambda, Events, and Kafka/MSK, with many other Moto services often working out of the box. It depends on aiobotocore, moto, and platformdirs, and targets Python 3.11 or later.
Use it for:
- Test async code that calls S3 or DynamoDB without mocking infrastructure or a separate server.
- Write integration tests for applications using aiobotocore across multiple AWS services.
- Validate data pipelines that read from and write to mock S3 buckets using async clients.
- Test SQS/SNS event handling in async code without deploying to AWS.
- Develop and debug async code locally with deterministic, in-process mocks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides async-compatible AWS service mocks for aiobotocore that share a backend with synchronous botocore clients, letting you test async and sync code against the same in-memory mock services.
Yes, if you test async AWS code with aiobotocore. It solves a real gap—Moto does not natively support async clients—and offers low install friction with active maintenance. Pre-alpha status and narrow version constraints mean you should pin versions and monitor releases, but the library is exercised in tests across multiple services and carries no known vulnerabilities.
Install
aiomoto on PyPI
pip
pip install aiomotouv
uv add aiomotopoetry
poetry add aiomotoInstalling aiomoto
Before you install
Low friction: pure Python wheel with three runtime dependencies (aiobotocore, moto, platformdirs). Actively maintained with a recent release; marked pre-alpha but exercised in tests across multiple AWS services.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install aiomoto
from aiobotocore.session import AioSession
from aiomoto import mock_aws
async def demo():
async with mock_aws():
session = AioSession()
async with session.create_client("s3", region_name="us-east-1") as s3:
result = await s3.list_buckets()
Requires Python 3.11 or later; aiobotocore and moto must be installed as runtime dependencies.
Verify before relying
- Whether free-threaded CPython support is production-ready or still experimental.
- Performance characteristics when mocking large datasets or high-concurrency workloads.
- Stability guarantees given pre-alpha status and narrow version ranges.
- Whether sync and async clients can truly share state in all tested service scenarios.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aiobotocore, moto, platformdirs |
| Maintenance | actively maintained — 76 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 100,333/month — #12,990 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiomoto-0.5.3-py3-none-any.whl
Keywords: aws, moto, aiobotocore, asyncio, testing, mocks
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
aioawsLightweight asyncio SDK for AWS S3, SES, and…
permissive · top 15,000 on PyPI
aioboto3Provides async/await support for AWS SDK…
permissive · top 1,000 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
motoMoto mocks AWS services for testing, allowing…
permissive · top 1,000 on PyPI
moto-extMocks AWS services for testing by intercepting…
permissive · top 15,000 on PyPI
dvc-s3Enables DVC to read from, write to, and manage…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-botocoreAdds distributed tracing to AWS SDK calls made…
permissive · top 5,000 on PyPI
localstack-clientA Python client that wraps boto3 to redirect…
permissive · top 5,000 on PyPI
py-key-value-aioProvides an async-only, pluggable key-value…
permissive · top 1,000 on PyPI
botoBoto is a Python interface to Amazon Web…
permissive · top 5,000 on PyPI