Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fake EC2 endpoint for testing

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.

like image 341
Lorin Hochstein Avatar asked Dec 12 '12 18:12

Lorin Hochstein


2 Answers

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.

like image 155
garnaat Avatar answered Sep 27 '22 19:09

garnaat


Eucalyptus have run a community cloud for many years which is freely available at http://www.eucalyptus.com/eucalyptus-cloud/community-cloud - it won't work if you're wanting to mock out different EC2 API responses (and one thing to note is that the Eucalyptus API doesn't follow the EC2 API completely, particularly in how they set different fields) - mocking out your calls to Boto seems like the best bet if you really want to test with real EC2 responses

like image 30
Peter Avatar answered Sep 27 '22 19:09

Peter