When we publish Ubuntu AMIs, we simultaneously publish machine consumable data to https://cloud-images.ubuntu.com/query/. The data there contains information so that you can:
- Find the latest ami of a given type (hvm/ebs/instance-store), arch, and region.
- Download the pristine image files
I think the format of the data is generally discernible, but there is some more information on the Ubuntu Wiki.
I've put an example client together. Here is some example usage:
- Launch the latest released image in us-east-1
- Open the Amazon EC2 console to launch the latest Oneiric daily build
- Download and extract the latest tarball for lucid Here, 'pubname' is the recommended "publish name" of this AMI, which happens to correspond to the basename of the name on EC2, and "url" is a fully qualified url to http://cloud-images.ubuntu.com .
$ euca-run-instances --instance-type t1.micro --key mykey $(ubuntu-ami)
You can now directly link to launching an image in Amazon EC2 console, combine that with this tool to open your browser to the right page.
$ ami=$(ubuntu-ami us-west-1 oneiric daily i386)
$ gnome-open https://console.aws.amazon.com/ec2/home?region=us-west-1#launchAmi=${ami}
$ wget $(ubuntu-ami -f "%{url} -O %{pubname}.tar.gz")
$ uec-publish-tarball *.tar.gz my-ubuntu-images
I don't think I'll get this into 11.10, but I'd like to have something with this function into 12.04, and support launching AMIs directly through it for ease of use. I'd love to hear input on what you'd like a "ubuntu-run-instance" command to look like and do.