I just got my Amazon EC2 account today and poked around a bit. Technically, it’s just a super cluster of virtualized servers running a (very likely) hacked copy of the open source Xen with a AJAX-enabled web management interface. The servers are undoubtedly Intel Xeons.

[root@domU-12-31-39-09-2E-31 ~]# uname -a
Linux domU-12-31-39-09-2E-31 2.6.18-xenU-ec2-v1.2 #2 SMP Wed Aug 19 09:04:38 EDT 2009 i686 i686 i386 GNU/Linux
[root@domU-12-31-39-09-2E-31 ~]# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping    : 10
cpu MHz        : 2666.760
cache size    : 6144 KB
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips    : 5335.77

There’s nothing technically amazing here but it’s interesting how Amazon put it together into a pay-per-use revenue model. It seems like they got the billing portion right.

Personally, I don’t quite like the management of it though. If you’ve used VMware ESX or Citrix XenServer you might agree with me.

For example, I couldn’t alter my firewall configuration once my instance was deployed. I created my first instance with a default firewall rule that drops everything, so in desperation I created another one.

Then I realized I couldn’t delete an instance either. It took me a while to figure out that there is actually a command line client tool written in Java that allows me to delete an instance. In fact, the client tool has way more capabilities than the funky AJAX web interface.

Here’s the Getting Started Guide. You need to read this to learn how to set up the authentication mechanisms. I presume most of us here can set up the Java environment variables no problem.

Here’s the EC2 Command Line Tools Reference.

It took me quite a while to find these links so do bookmark them.

***

Just a quick start for everyone here since the authentication part is a hassle. The documentation had a bunch of talk cock before they got to the point.

  1. You’ll need to login to AWS, then go under the Your Account > Security Credentials menu on the top right hand corner.
  2. Scroll down and look under the Access Credentials heading.
  3. Click the X.509 Certificates tab.
  4. Click Create a new Ceritificate.
  5. Download both the Private Key File and Certificate File.
  6. Get down to your command prompt.
  7. Change to the directory where you unzipped the EC2 API tools.
  8. Make sure JAVA_HOME and PATH are both set.
  9. Set EC2_HOME to the directory in step 7 above.
  10. Change to the bin directory within the EC2 API tools directory.

You’re all ready to go run the .cmd files (for Windows) or the non .cmd files (for MacOS/Linux guys).

***

Update: Here’s a freebie for the MacOS X users – paste these into ~/.bash_profile so you don’t have to specify your key and cert all the time. (Edit where necessary.)

export JAVA_HOME=/Library/Java/Home
export EC2_HOME=~/Downloads/ec2-api-tools-1.3-46266
export EC2_PRIVATE_KEY=~/Downloads/pk-XXXX.pem
export EC2_CERT=~/Downloads/cert-XXXX.pem
export PATH=$PATH:$EC2_HOME/bin