Getting Started with Amazon EC2

>> Tuesday, September 30, 2008

Today I was trying to use Amazon EC2 and was successful deploying an image and working with the deployed images. It went pretty well, thanks to this great video. Yes these instructions are on windows but it will be pretty much similar within Linux too.

The command line tools they've provided are wrappers for java Web services stubs which will call amazon Web services. The sad thing is that they have used XFire to generate the clients without using currently active Axis2 or CXF projects. XFire project site clearly states (as of now) that their won't be any more developments in that project.

Anyway the tools seems to be great, at least from the usability point-of-view and now I need to write my own wrappers using Axis2 clients.

3 comments:

SteveL Oct 1, 2008 5:34:00 AM  

No, you should use their rest API. Typica does this for you.

Why? The REST api provides more features than the SOAP API that is effectively frozen. Furthermore, typica is tested and stable. The typica team get to beta test new features under NDA, and have a high quality implementation without you having to do the heavy lifting. Don't waste time with the Amazon clients.

We have some SmartFrog components that work with EC2 BTW; they use typica underneath. I'm happy with it.

Eran Chinthaka Oct 1, 2008 10:36:00 AM  

Wow, thanks Steve for the advice.

I knew Amazon had a REST API but didn't want to dig in to the details, as I thought I would have to understand all the params and do on my your own.

But if Typics provides that abstration I'd be happy test that. Is this their site : http://code.google.com/p/typica/

This brings up another good scenario for WSDL 2.0 HTTP Binding. If Amazon can expose their service using a WSDL 2.0 document too, with an HTTP and a SOAP binding, we could have use Axis2 to invoke this API using SOAP and REST (or POX, if you want the correct statement).

SteveL Oct 2, 2008 6:15:00 AM  

-yes, that is the typica site. If there is one limitation of it, they use JAXB for O/X mapping, which makes it very brittle about which JVM version it builds/runs on. If they had a better representation of XML in Java, life would be simpler.

I don't think AWS have their own WSDL for the Rest interface. One thing they have is their own authentication protocol, which is wierd -you checksum the (ordered) query and headers (and maybe body), sign that with your secret key, and append the signature to the end of the query. Client libraries need special code to do this: both Typica and Restlet have the code to hand. You'd need to get it into Axis2 as well. Which would also let you work with the S3 filestore, so it is something to consider.