All Projects → spulec → Moto

spulec / Moto

Licence: apache-2.0
A library that allows you to easily mock out tests based on AWS infrastructure.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
shell
77523 projects
Jinja
831 projects
java
68154 projects - #9 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Moto

Deploy Strapi On Aws
Deploying a Strapi API on AWS (EC2 & RDS & S3)
Stars: ✭ 121 (-97.77%)
Mutual labels:  aws, s3, ec2
Cloud Security Audit
A command line security audit tool for Amazon Web Services
Stars: ✭ 68 (-98.75%)
Mutual labels:  aws, s3, ec2
Aws
A collection of bash shell scripts for automating various tasks with Amazon Web Services using the AWS CLI and jq.
Stars: ✭ 493 (-90.92%)
Mutual labels:  aws, s3, ec2
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+82.3%)
Mutual labels:  aws, s3, ec2
Aws Workflows On Github
Workflows for automation of AWS services setup from Github CI/CD
Stars: ✭ 95 (-98.25%)
Mutual labels:  aws, s3, ec2
Rpcheckup
rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.
Stars: ✭ 91 (-98.32%)
Mutual labels:  aws, s3, ec2
Aws Inventory
Python script for AWS resources inventory (cheaper than AWS Config)
Stars: ✭ 69 (-98.73%)
Mutual labels:  aws, s3, ec2
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (-98.19%)
Mutual labels:  aws, s3, ec2
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (-97.18%)
Mutual labels:  aws, s3, ec2
mining-camp
Easy automated configuration and deployment of Minecraft servers on AWS spot instances, featuring automatic backups and restoration using S3.
Stars: ✭ 43 (-99.21%)
Mutual labels:  ec2, s3
tech1-temple-aws
AWS Proofs of Concepts repository. No Longer Supported
Stars: ✭ 32 (-99.41%)
Mutual labels:  ec2, s3
Fluent Plugin S3
Amazon S3 input and output plugin for Fluentd
Stars: ✭ 276 (-94.92%)
Mutual labels:  aws, s3
go-localstack
Go Wrapper for using localstack
Stars: ✭ 56 (-98.97%)
Mutual labels:  ec2, s3
Amazon
Simple access to Amazon's web services.
Stars: ✭ 20 (-99.63%)
Mutual labels:  ec2, s3
Spark Jupyter Aws
A guide on how to set up Jupyter with Pyspark painlessly on AWS EC2 clusters, with S3 I/O support
Stars: ✭ 259 (-95.23%)
Mutual labels:  aws, ec2
nifi
Deploy a secured, clustered, auto-scaling NiFi service in AWS.
Stars: ✭ 37 (-99.32%)
Mutual labels:  ec2, s3
Aws.s3
Amazon Simple Storage Service (S3) API Client
Stars: ✭ 302 (-94.44%)
Mutual labels:  aws, s3
Vue Cli Plugin S3 Deploy
A vue-cli plugin that uploads your built Vue.js project to an S3 bucket
Stars: ✭ 304 (-94.4%)
Mutual labels:  aws, s3
Aws Toolkit Eclipse
AWS Toolkit for Eclipse – an open-source plugin for developing, deploying, and managing AWS applications.
Stars: ✭ 252 (-95.36%)
Mutual labels:  aws, ec2
Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (-94.58%)
Mutual labels:  aws, ec2

Moto - Mock AWS Services

Join the chat at https://gitter.im/awsmoto/Lobby

Build Status Coverage Status Docs PyPI PyPI - Python Version PyPI - Downloads Code style: black

Install

$ pip install moto[ec2,s3,all]

In a nutshell

Moto is a library that allows your tests to easily mock out AWS Services.

Imagine you have the following python code that you want to test:

import boto3

class MyModel(object):
    def __init__(self, name, value):
        self.name = name
        self.value = value

    def save(self):
        s3 = boto3.client('s3', region_name='us-east-1')
        s3.put_object(Bucket='mybucket', Key=self.name, Body=self.value)

Take a minute to think how you would have tested that in the past.

Now see how you could test it with Moto:

import boto3
from moto import mock_s3
from mymodule import MyModel

@mock_s3
def test_my_model_save():
    conn = boto3.resource('s3', region_name='us-east-1')
    # We need to create the bucket since this is all in Moto's 'virtual' AWS account
    conn.create_bucket(Bucket='mybucket')
    model_instance = MyModel('steve', 'is awesome')
    model_instance.save()
    body = conn.Object('mybucket', 'steve').get()['Body'].read().decode("utf-8")
    assert body == 'is awesome'

With the decorator wrapping the test, all the calls to s3 are automatically mocked out. The mock keeps the state of the buckets and keys.

For a full list of which services and features are covered, please see our implementation coverage.

Documentation

The full documentation can be found here:

http://docs.getmoto.org/en/latest/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].