Moto

Python library that mocks AWS services for unit testing. Moto intercepts boto3 calls and returns realistic responses without hitting actual AWS — supporting 100+ AWS services including S3, Lambda, DynamoDB, SQS, SNS, IAM, EC2, and more. Agents and applications using AWS services can be tested locally without credentials, costs, or side effects.

Evaluated Mar 06, 2026 (0d ago) v5.x
Homepage ↗ Repo ↗ Developer Tools python testing aws mock boto3 unit-testing open-source s3 lambda
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
89
/ 100
Is it safe for agents?
⚡ Reliability
83
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
85
Error Messages
80
Auth Simplicity
95
Rate Limits
95

🔒 Security

TLS Enforcement
90
Auth Strength
90
Scope Granularity
85
Dep. Hygiene
85
Secret Handling
92

Local-only testing tool — no network calls to AWS. No real credentials needed. Mock credentials in test env variables are safe. No sensitive data leaves local environment.

⚡ Reliability

Uptime/SLA
88
Version Stability
82
Breaking Changes
78
Error Recovery
85
AF Security Reliability

Best When

You're building Python applications using boto3/botocore and want fast, isolated unit tests that don't require AWS credentials or incur AWS costs.

Avoid When

You need exact AWS behavior fidelity — use LocalStack (Docker-based, more compatible) or actual AWS with dedicated test accounts for integration testing.

Use Cases

  • Write unit tests for agent code that reads/writes to S3 — mock buckets and objects with @mock_s3 decorator without AWS credentials
  • Test agent Lambda functions locally with Moto's Lambda mock — invoke functions, check payloads, and verify execution without deploying
  • Mock SQS queues for testing agent message processing pipelines — send, receive, and delete messages in tests without AWS costs
  • Test DynamoDB-backed agent state stores with in-memory mocked tables — verify queries, scans, and batch operations without real infrastructure
  • Test IAM-sensitive code paths with Moto's IAM mock — verify role assumptions, policy evaluations, and permission boundaries in unit tests

Not For

  • Integration testing against real AWS behavior edge cases — Moto approximates AWS behavior but is not 100% compatible with all edge cases
  • Testing AWS services not yet supported by Moto — check service coverage before adopting for a specific service
  • Performance testing — Moto's in-memory implementation doesn't replicate AWS performance characteristics

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Library — no external auth needed. Moto mocks AWS services locally — any dummy credentials work inside mock context (AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Apache 2.0 open source. MotoServer mode (standalone HTTP server) also available for non-Python testing.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • Mock state is NOT reset between tests automatically when using @mock_aws class decorator — use mock.reset() or use function-level decorators to ensure test isolation
  • Moto must be activated BEFORE boto3 clients are created — instantiating boto3 clients before @mock_aws context starts results in real AWS calls even inside the context
  • Environment must set dummy AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION) — Moto rejects calls without credentials even though they're fake
  • Moto's coverage of AWS APIs is comprehensive but not exhaustive — some newer AWS features, specific API parameters, or edge case error conditions may not be implemented
  • Cross-service interactions may not match AWS behavior — for example, S3 event notifications to Lambda may not trigger Lambda execution in Moto the same way AWS does
  • MotoServer mode (HTTP server) has different initialization requirements than the in-process decorator mode — mixing the two modes in a test suite causes confusing failures

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Moto.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered