Fake EC2 endpoint for testing

amazon-ec2, boto, mocking, testing

Solution

You might want to check out moto. It basically mocks boto itself using HTTPretty to mock the HTTP layer. Its nicely done and seems really useful.

Problem

Is there an open source package that implements a "fake Amazon EC2" endpoint out there? Specifically, one that can be used for testing against clients that talk to EC2 (in particular, using boto)? I know there are several open source cloud solutions out there that implement the EC2 API (e.g., OpenStack, Eucalyptus, CloudStack), but I'm looking for something where I can quickly bring up a fake EC2 server and configure it with canned responses for testing purposes.

Original source