Notes on using the Ubuntu EC2 AMI

The beta release still has some large bugs (it hangs trying to install Java, for example), but should be useful once it's finally released. It's really nice to be able to start up an NX client and use the desktop remotely.
ec2-run-instances ami-814aaee8 --key ec2-keypair
ec2-describe-instances
[add 
Host *.amazonaws.com
IdentityFile ~/.ec2/ec2-keypair.pem
to ~/.ssh/config on your local machine]
ssh root@{yourinstance}.amazonaws.com
[choose to install Basic Ubuntu server, OpenSSH server]
[ssh again after logged out]
aptitude update && aptitude safe-upgrade -y
aptitude install xorg gnome-core gdm human-theme synaptic
adduser {yourname}
nano /etc/sudoers
[enable {yourname} for ALL privileges]

On the server, fetch and install 3 deb packages for NX Free Edition for Linux.
On the client, download the appropriate NX Client, run NX Configuration Wizard, then connect with NX Client. Choose Gnome.

Enable multiverse using Synaptic or in /etc/apt/sources.list, then install the packages you need:

sudo aptitude install firefox phpmyadmin
[add openjdk-6-jre or sun-java6-jre, and tomcat6, once java installation is working]
Copy pk-{yourcert}.pem and cert-{yourcert}.pem from your local machine to /mnt on the server, then create a new AMI of the current instance:
sudo ec2-bundle-vol --destination /mnt --privatekey /mnt/pk-{yourcert}.pem --cert /mnt/cert-{yourcert}.pem --user your-aws-id --arch i386
sudo ec2-upload-bundle --bucket {make-up-a-bucket-id} --manifest /mnt/image.manifest.xml --access-key {your-aws-access-key} --secret-key {your-aws-secret-key}