--- id: moto-ext version: "5.1.45" license: Apache-2.0 license_treatment: permissive maintenance: active --- # moto-ext — A library that allows you to easily mock out tests based on AWS infrastructure License: permissive · Maintenance: active · Downloads: 253.6K/mo ## What it is and what it does Moto-ext is a fork of Moto that mocks AWS services for local testing. It intercepts boto3 calls and simulates AWS behavior in-process, letting you test code that depends on AWS without provisioning real infrastructure or incurring costs. The fork includes patches tailored for LocalStack for AWS. You use it by decorating test functions or context managers to enable mocking for specific services (S3, EC2, DynamoDB, etc.). Your boto3 client calls then hit the mock instead of AWS. It supports a broad surface of AWS services and maintains active development with recent releases. Use it for: - Unit test code that reads/writes to S3 without creating real buckets or objects. - Test EC2 instance lifecycle logic (launch, terminate, describe) in isolation. - Mock DynamoDB tables and queries for rapid iteration on data layer code. - Integration test multi-service workflows (e.g., Lambda triggering SNS) locally. - Validate IAM policy logic and role assumptions before deployment. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Mocks AWS services for testing by intercepting boto3 calls, allowing you to test AWS-dependent code without hitting real AWS infrastructure. Yes. Active maintenance, low friction, permissive license, and no known vulnerabilities make this a solid choice for local AWS testing. The fork's LocalStack patches add value if you use LocalStack; otherwise, consider whether the upstream Moto project better suits your needs. ## Install pip install moto-ext uv add moto-ext poetry add moto-ext ## Installing moto-ext Before you install: Active maintenance with a release 4 days ago. Low install friction via a pure-Python wheel. Depends on boto3, botocore, and several common libraries (cryptography, requests, werkzeug, Jinja2, responses) that are widely used and well-maintained. License in practice: Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install moto-ext from moto import mock_s3 import boto3 @mock_s3 def test_s3(): client = boto3.client('s3', region_name='us-east-1') client.create_bucket(Bucket='test-bucket') response = client.list_buckets() assert len(response['Buckets']) == 1 Requires Python 3.9 or later. Verify before relying: - Whether all LocalStack patches are documented or discoverable compared to upstream Moto. - Performance characteristics when mocking large numbers of AWS resources or complex state. - Compatibility guarantees with specific AWS service versions or boto3 releases. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 253.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aws mocking library, boto3 mock testing, local aws testing, aws service simulation, ec2 s3 mock, aws infrastructure testing, aws-testing, mocking, localstack [View on SkillFed](https://skillfed.io/packages/moto-ext) · [View on PyPI](https://pypi.org/project/moto-ext/)