3

I am scripting creation and manipulation of an ec2 instance. During testing all is well except that I actually launch the instance, which fairly costly in the long run.

I have been searching for a test end point where I can verify that syntax of the call I make is ok, but I have not been able to find one.

Is there any way I can send ec2 api requests, for instance running new instances, and get responses without actually launching the instance?

steenhulthin
  • 4,553
  • 5
  • 33
  • 52
  • You're looking for a mocking framework, such as Mockito for Java: http://mockito.org/ -- what language are you using? – stivlo Aug 07 '11 at 14:07
  • @stivlo I am using the (windows) command line tools. Mocking is however not what I am looking for here. I does not make much sense to mock out something that I am not certain how works. A test service that behaves similar to the real service would be perfect, but I have not find such a thing. – steenhulthin Aug 07 '11 at 17:29
  • I see, I've misunderstood you, you want to "test" to learn, not do automatic tests. I don't know your budget, but launching micro instances is pretty cheap. You might even be in the free tier. – stivlo Aug 07 '11 at 18:09

1 Answers1

1

I see a few ways. The cheapest I think is (as @stivlo suggested) run up one of the free instances.

Maybe a bit overkill but you could run a local version of Eucalyptus for testing. See more at http://open.eucalyptus.com/. When I looked at it (about 6-9 months ago) it worked with the ec2 tools

The third (and possibly most suitable) is write a script that stops\terminates an ec2 instance. That way you run one up, when it's been confirmed turn it off. The cost involved would be pence.

Matt
  • 1,931
  • 12
  • 20
  • I used the first approach. The second suggestion is interesting (however not feasible in my case). The third suggestion is not really that suitable for Amazons EC2, since they charge as follows: "Each partial instance-hour consumed will be billed as a full hour." (from http://aws.amazon.com/ec2/pricing/) – steenhulthin Aug 17 '11 at 20:07