Test code that creates S3 buckets and uploads files without connecting to real AWS
Run unit tests for Lambda or DynamoDB logic in memory without cloud costs
Simulate AWS service behavior in CI pipelines to validate infrastructure scripts
Install only the services you need, e.g. moto[s3] for S3 or moto[all] for everything.
Moto is a Python library that lets you test code that uses Amazon Web Services without actually connecting to AWS. When you run tests, Moto intercepts the calls your code makes to AWS services and handles them in memory instead, simulating the behavior of real AWS without any cost, network dependency, or risk of accidentally modifying real infrastructure. The way it works is straightforward. You wrap a test function with a decorator from Moto, and from that point on, any AWS calls inside that function hit a fake in-memory version of the service instead of the real one. The fake service keeps track of state as the test runs, so if your code creates an S3 bucket and then uploads a file to it, Moto remembers both the bucket and the file, and a subsequent read will return the right data. Moto supports a wide range of AWS services. The ones most commonly used include S3 (object storage), EC2 (virtual machines), and many others. A full list of covered services and features is maintained in the repository's implementation coverage file. Installation is through pip, Python's package manager. You install only the services you need, for example moto[s3] for S3 or moto[all] for everything. The library is used alongside boto3, which is the standard AWS SDK for Python. It is released under an open-source license and supported financially through OpenCollective sponsorship.
← getmoto on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.