I have just gotten around to using the amazon ec2 tools to manage my amazon machine images from my linux laptop. I mentioned before that I am rolling with fedora 8 on a new laptop, and it's been sweet. But there are gotchas here and there and I ran into one today with the ec2 tools.
Turns out that fedora 8 comes with 2 JVMs: GCJ 1.5.0 and IcedTea 1.7.0 - those are installed via yum or selected during the install process. I have no problems with any java-based GUI apps that I have installed like Oxygen and dbvisualizer, but when running the ec2-describe-images command, I got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError:
org.codehaus.xfire.aegis.type.xml.SourceType
at java.lang.Class.initializeClass(libgcj.so.8rh)
etc....
I had my JAVA_HOME set to what redhat and fedora lilke: /usr/lib/jvm/java, which is really a sym link pointing into the /etc/alternatives library of sym links. It's actually a great way to switch globally between JVMs, because you can use the system-switch-java applet to quicky change your JVM if you have multiple versions installed. So I did and switched from 1.7 over to GNU 1.5 and tried again. Same exception was thrown.
It turns out the the ec2 tools really only work with Sun's JVM, which I downloaded and installed via the RPM from sun.com. After installing, uninstalling, reinstalling a few times I determined that for whatever reason the 1.6 JVM from Sun was never going to appear as an option within the system-switch-java applet. So I changed my JAVA_HOME variable from /usr/lib/jvm/java to /usr/java/default, which is what Sun likes.
Now the ec2 command line tools work great!