Ubuntu and Debian AMIs for Amazon EC2

Public AMIs (Amazon Machine Images) for running Ubuntu or Debian on Amazon EC2 (Elastic Compute Cloud).

Ubuntu Release base install
32-bit
base install
64-bit
desktop
32-bit
desktop
64-bit
RightScale
32-bit
Notes
Ubuntu 8.04 LTS Hardy ami-179e7a7e ami-f89d7991 ami-f39e7a9a ami-d7fa1ebe ami-b1ea0ed8 RECOMMENDED
Ubuntu 7.10 Gutsy ami-159e7a7c ami-f99d7990 ami-f09e7a99
Ubuntu 7.04 Feisty ami-cd9e7aa4 obsolescent
Ubuntu 6.10 Edgy ami-0d57b264 obsolete
Ubuntu 6.06 LTS Dapper ami-ca9e7aa3 ami-cb9e7aa2
Ubuntu Intrepid Ibex Alpha ami-9de105f4 ami-d4e206bd alpha
Debian Release base install
32-bit
base install
64-bit
desktop
32-bit
desktop
64-bit
RightScale
32-bit
Notes
Debian 5.0 Lenny ami-169e7a7f ami-e69d798f ami-f59e7a9c "testing"
Debian 4.0 Etch ami-099e7a60 ami-e59d798c ami-129e7a7b "stable"

Support

Support for the Ubuntu AMIs is available on the ec2ubuntu Google Group where there is a growing community of folks using Ubuntu on EC2:

http://groups.google.com/group/ec2ubuntu

Support for the Debian AMIs is available on the ec2debian Google Group:

http://groups.google.com/group/ec2debian

If you use or are thinking of using one of these AMIs, please subscribe to these groups so you can find out about updates to the AMIs and tips for running Ubuntu and Debian on Amazon EC2.

Getting Started

If you somehow ended up on this page and have no clue what it's all about, you'll want to read up on Amazon EC2 (Elastic Compute Cloud).

http://aws.amazon.com/ec2

Then, I recommend stepping through the Amazon EC2 Getting Started Guide.

http://ec2gsg.notlong.com

When you get to a point where it talks about running an AMI, feel free to use one of the above Ubuntu or Debian AMIs instead.

When you get stuck, drop by the support group mentioned above.

Philosophy

The base install AMIs are built with the minimal Ubuntu or Debian system. No assumption is made about your intended purpose or desired software choices. Given that this is Ubuntu/Debian, it is generally trivial to turn a base install into a web, database, or email server, complete LAMP system, or just about any other application.

The desktop AMIs are provided as experimental systems. It takes over an hour to install the Ubuntu desktop on EC2, so I figured it would be nice to give folks a chance to try one out without this wait.

Credits

Many thanks to all of the others who have posted their Ubuntu and Debian build experience, notes, and fixes, and to the folks who have assisted me directly. The above AMIs and the associated build script are a compilation of as much experience as I could gather. I consider this a community project. Special thanks go to:

The current custodian of these Ubuntu and Debian AMIs, the build script, and this web page is Eric Hammond.

Desktop AMIs

WARNING! If you don't absolutely need a desktop, please use one of the "base install" AMIs instead. The desktop AMIs are many times larger and take many times longer to start up. The base install AMIs are sleek, lean, and ready for service.

Since you didn't listen to the advice in the previous paragraph, here's how to set things up once you instantiate a desktop AMI. On the instance, create a system user (remember your new password):

  user-setup

On your local computer, install and run an NX client from NoMachine.com:

http://www.nomachine.com/download.php

Clients available for Windows, Linux, Mac OSX, Solaris. For example, on my local Ubuntu system, I use:

curl -O \
  http://64.34.161.181/download/3.2.0/Linux/nxclient_3.2.0-9_i386.deb
sudo dpkg -i nxclient_3.2.0-9_i386.deb
/usr/NX/bin/nxclient --wizard

Point the NX Client to the external hostname of your Ubuntu desktop EC2 instance and enter the username/password from above. Choose the "Gnome" desktop.

Build Script

You do not need to read this section to use one of the above Ubuntu or Debian AMIs on EC2. This is only here to document how the AMIs were built and to provide guidance to advanced users who wish to build their own Ubuntu or Debian AMIs from scratch.

The following build script creates an Ubuntu or Debian AMI for EC2:

http://ec2ubuntu-build-ami.notlong.com

The basic instructions for using this script are as follows:

  1. Pick which instance type and kernel version you want in your Ubuntu AMI. Start an instance of the matching Amazon Fedora Core AMI:
    32-bit, 2.6.21 kernel: ami-f51aff9c
    32-bit, 2.6.16 kernel: ami-20b65349
    64-bit, 2.6.21 kernel: ami-f21aff9b
    64-bit, 2.6.16 kernel: ami-36ff1a5f
    
  2. Copy your certificate file and private key file to the EC2 instance ephemeral storage, then ssh to the EC2 instance HOSTNAME using your ssh IDENTITY file:
    scp -i IDENTITY {cert,pk}-*.pem root@HOSTNAME:/mnt/
    ssh -i IDENTITY root@HOSTNAME
    
  3. Download the build script.
    curl -Lo /mnt/ec2ubuntu-build-ami \
      http://ec2ubuntu-build-ami.notlong.com
    
  4. Run the build script passing options as desired. Read the comments at the top of the script for more options.
    bash /mnt/ec2ubuntu-build-ami \
        --codename hardy          \
        --bucket NAME             \
        --prefix NAME             \
        --user ID                 \
        --access-key ID           \
        --secret-key ID           \
        --private-key PATH        \
        --cert PATH
    
  5. Register the AMI from your local computer. Instructions will be provided when the build script completes.