whatisgithub

What is moto?

getmoto/moto — explained in plain English

Analysis updated 2026-06-24

8,480PythonAudience · developerComplexity · 2/5Setup · easy

In one sentence

Moto is a Python library that intercepts AWS API calls during tests and handles them in memory, so you can test code that uses AWS without connecting to real cloud services.

Mindmap

mindmap
  root((repo))
    What it does
      Mock AWS API calls
      Run tests offline
      Simulate AWS services
    Services Covered
      S3 storage
      EC2 instances
      Many more
    Tech Stack
      Python
      boto3
      pip
    Audience
      Python developers
      AWS developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Test code that creates S3 buckets and uploads files without connecting to real AWS

USE CASE 2

Run unit tests for Lambda or DynamoDB logic in memory without cloud costs

USE CASE 3

Simulate AWS service behavior in CI pipelines to validate infrastructure scripts

What is it built with?

Pythonboto3pip

How does it compare?

getmoto/motonetease-youdao/emotivoicemrexodia/ida-pro-mcp
Stars8,4808,4808,479
LanguagePythonPythonPython
Setup difficultyeasyhardhard
Complexity2/53/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Install only the services you need, e.g. moto[s3] for S3 or moto[all] for everything.

So what is it?

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.

Copy-paste prompts

Prompt 1
Show me how to use Moto to test a Python function that uploads a file to S3 using boto3
Prompt 2
Help me write a pytest test that uses Moto to simulate an SQS queue receiving messages
Prompt 3
Set up Moto in my CI pipeline to mock all AWS calls for an app that uses EC2 and DynamoDB

Frequently asked questions

What is moto?

Moto is a Python library that intercepts AWS API calls during tests and handles them in memory, so you can test code that uses AWS without connecting to real cloud services.

What language is moto written in?

Mainly Python. The stack also includes Python, boto3, pip.

How hard is moto to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is moto for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.