skillfed

aiomoto

Moto-style AWS service mocks for aiobotocore

aiomoto v0.5.3 100.3K downloads/30d#12,990 on PyPI14
Permissive license MIT Active released

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 aiomoto

uv

uv add aiomoto

poetry

poetry add aiomoto

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Free Threading :: 3 - StableProgramming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: LibrariesTopic :: Software Development :: Testing

Tags

async AWS mockingaiobotocore testingmock AWS services asyncaiobotocore motoasync S3 DynamoDB testingmoto aiobotocorein-memory AWS mocks
async-testingaws-mockingaiobotocore

More Libraries packages