Archive for the ‘EC2’ Category

Amazon PHP SDK v1.4.7 set_region bug for EC2: DNS names not properly resolved

Saturday, December 3rd, 2011

Version 1.4.7 of the Amazon PHP SDK added the new Oregon region (along with the United States government private GovCloud region) but introduced a bug rendering the whole library useless as it cannot resolve the correct DNS names.

Prior to v1.4.7, the AmazonEC2 library used these constants (in /usr/share/php/AWSSDKforPHP/services/ec2.class.php):

    /*%******************************************************************************************%*/
    // CLASS CONSTANTS

    /**
     * Specify the default queue URL.
     */
    const DEFAULT_URL = 'ec2.amazonaws.com';

    /**
     * Specify the queue URL for the US-East (Northern Virginia) Region.
     */
    const REGION_US_E1 = 'us-east-1';

    /**
     * Specify the queue URL for the US-West (Northern California) Region.
     */
    const REGION_US_W1 = 'us-west-1';

    /**
     * Specify the queue URL for the EU (Ireland) Region.
     */
    const REGION_EU_W1 = 'eu-west-1';

    /**
     * Specify the queue URL for the Asia Pacific (Singapore) Region.
     */
    const REGION_APAC_SE1 = 'ap-southeast-1';

    /**
     * Specify the queue URL for the Asia Pacific (Japan) Region.
     */
    const REGION_APAC_NE1 = 'ap-northeast-1';

And the code used to reconstruct the DNS entry was

    /**
     * This allows you to explicitly sets the region for the service to use.
     *
     * @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>, <REGION_US_W1>, <REGION_EU_W1>, or <REGION_APAC_SE1>.
     * @return $this A reference to the current instance.
     */
    public function set_region($region)
    {
        $this->set_hostname('http://ec2.'. $region .'.amazonaws.com');
        return $this;
    }

With the upgrade to v1.4.7, those constants were changed to a FQDN, while the set_region() function was not changed at all:

    /*%******************************************************************************************%*/
    // CLASS CONSTANTS

    /**
     * Specify the queue URL for the United States East (Northern Virginia) Region.
     */
    const REGION_US_E1 = 'ec2.us-east-1.amazonaws.com';

    /**
     * Specify the queue URL for the United States West (Northern California) Region.
     */
    const REGION_US_W1 = 'ec2.us-west-1.amazonaws.com';

    /**
     * Specify the queue URL for the United States West (Oregon) Region.
     */
    const REGION_US_W2 = 'ec2.us-west-2.amazonaws.com';

    /**
     * Specify the queue URL for the Europe West (Ireland) Region.
     */
    const REGION_EU_W1 = 'ec2.eu-west-1.amazonaws.com';

    /**
     * Specify the queue URL for the Asia Pacific Southeast (Singapore) Region.
     */
    const REGION_APAC_SE1 = 'ec2.ap-southeast-1.amazonaws.com';

    /**
     * Specify the queue URL for the Asia Pacific Northeast (Tokyo) Region.
     */
    const REGION_APAC_NE1 = 'ec2.ap-northeast-1.amazonaws.com';

    /**
     * Specify the queue URL for the United States GovCloud Region.
     */
    const REGION_US_GOV1 = 'ec2.us-gov-west-1.amazonaws.com';

So, for instance, if you were using REGION_US_W1 before,
the old SDK would resolve the url to ‘http://ec2.us-west-1.amazonaws.com’ using set_region()

As of v1.4.7, REGION_US_W1 was changed to
‘ec2.us-west-1.amazonaws.com’
so now set_region() builds the url as the non very pretty
‘http://ec2.ec2.us-west-1.amazonaws.com.amazonaws.com’

and triggers this PHP fatal error

PHP Fatal error:  Uncaught exception 'RequestCore_Exception' with message 'cURL resource: Resource id #62; cURL error: Couldn't resolve host 'ec2.ec2.us-west-1.amazonaws.com.amazonaws.com' (6)' in /usr/share/php/AWSSDKforPHP/lib/requestcore/requestcore.class.php:824
Stack trace:
#0/usr/share/php/AWSSDKforPHP/sdk.class.php(1185): RequestCore->send_request()

To fix the error, modify set_region to:

    public function set_region($region)
    {
        //$this->set_hostname('http://ec2.'. $region .'.amazonaws.com');
        $this->set_hostname('http://'.$region);
        return $this;
    }

——————————————————————
Update 12/07/2011:
Version 1.4.8 of the PHP SDK corrects the bug.

Installing the Amazon EC2 Command Line Tools to launch persistent instances

Monday, December 27th, 2010

This article is a jump start guide for anyone wanting to use Amazon EC2, from the basic concepts and terminology to the more advanced (and poorly documented) ways of managing your instances using the command line tool that give you access to the more powerful configuration options the GUI lacks.

1/ Introduction

Amazon Elastic Compute Cloud (Amazon EC2) allows you to create and destroy computers on the fly with the simple wave of a magic wand.

For example if you need a computer for just a few hours in order to perform calculations or test a specific software on a platform you don’t have access to right away, you don’t need to buy a whole machine, you launch an instance of a computer, and you will pay a small fee per hour (ranging from a few cents per hour for the least powerful one to a couple of dollars for the most expensive ones).

So for us mortals instance = computer.

Here are a few applications EC2 can be useful for:
- having access to a lot of CPU power for a limited amount of time (like renting a supercomputer and pay only for the few hours you use it, and it will be cheap as in a couple of dollars)
- testing software on different configuration (does your newly written software run on all flavors of Linux? and on Windows? and on that latest Linux kernel? and on that old Linux kernel?)
- testing software or protocols that require lots of nodes, like for instance routing protocols, as the creation of computers can be automated (through the command line, not the GUI)

The least powerful instance is called Micro and priced at $0.02 per hour while the most powerful one is called Quadruple Extra Large of the Cluster GPU Instances costs $2.10 per hour.

Amazon provides an easy to use Graphical User Interface (GUI) to create and destroy instances, called the AWS Management Console.

Basically creating an instance is equivalent to going to your favorite computer store and ordering a computer, specifying the parts you want.

Meaning everything is configurable from:
- the hardware: you can basically order from a small 32-bit computer with one virtual CPU and 613MB of RAM to a big 64-bit computer with 32 CPU and 1690GB of RAM (yes 1.6TB of RAM)
- the OS: you can install Windows, or any kind of Linux distribution (Ubuntu, Cent OS, Fedora, Debian,…). The OS you install is bundled into a package (an image) called AMI.
- the software: firewall (SSH access), any software the OS support.

For a complete list of available configurations are pricing, see the main EC2 page.

2/ Terminology and example use

Here is a little terminology:
- Launching an instance: means creating a virtual computer with the specifications you provide (Linux or Windows, Ubuntu or Fedora or others, firewall configuration and access using key pairs); it’s like going to a shop and buying a brand new computer.
- Terminating an instance: means destroying it, Terminator-like: it’s like smashing it with a hydraulic press, or running a big rig over it, or dipping it in molten steel, meaning the data you put on that computer are gone. Forever.
- Stopping an instance: means pausing it, like shutting down your computer for the night. No data is lost and while stopped the instance doesn’t cost you anything. Only running instances are billed by the hour.
- Starting an instance: means awaking the computer from sleep in the morning, and resuming what you were doing when you stopped it, with all the data it had. When the instance is started, you are being billed per hour for its usage.
- AMI: the image of the OS you are installing. You can see it as the Microsoft CD you use to install Windows on your computer.

So a basic life cycle is:
1/ Chose an instance (hardware, OS)
2/ Launch it (and start being billed for it)
3/ Log onto it (most likely using SSH on Linux or Remote Desktop in Windows)
4/ Install what you want on it like a regular computer and do whatever you want
5/ Stop the instance when you don’t need it right now (but will need it later) so you’re not being charged for the time the instance is started
6/ Start the instance when you wake up and need to use it
7/ Terminate the instance when you will no longer use it anymore (after probably having backed up all your data you needed to backup)

3/ Advanced configuration with the Command Line Tools

Instances are nice, but the main drawback is that you lose all your data if you terminate it.

By data we basically mean all that’s on the hard drive of the instance, from the root folder to your home directories.

No big deal because you just need not to terminate it?
Well if the instance has a problem out of your control, you lose your data. It’s not uncommon to see your nice instance marked as degraded.

Amazon provides 2 types of storage:
- Instance store: the data live with the instance (terminate the instance and you delete your data)
- EBS store: the data lives independently from the instances.

That’s why when you create an instance for example with latest Ubuntu 10.10 Maverick Meerkat, you can chose your AMI to come with the “root store” to be either “instance” or “EBS”.

So you basically always want EBS to have persistence right?

Yes, but for astonishing reasons beyond comprehension, the EBS store actually have persistence disabled by default!

By digging a little bit in the EC2 documentation, you will find the confirmation that EBS has persistence disabled by default, along with how to enable persistence on a EBS volume:

By default, the root device volume for an AMI backed by Amazon EBS is deleted when the instance terminates.
You can change that default behavior when you launch the instance. In this section, we show you how to set the DeleteOnTermination flag to false in the instance’s block device mapping at launch time.
You can’t currently do this in the AWS Management Console; you must use the command line tools. You can verify the change in the console, however.

Ouch, we can’t do that using the GUI, and need to use those mysterious command line tools (a nice hyperlink to those would have been nice in the doc, hey, Amazon).

Then you start browsing the forum and realize lots of people are asking questions about installing those tools, with few answers.

Fortunately we did the chewing for you.

The command line tools (aka Amazon EC2 API Tools) are available here.

And you need to install them on a Linux computer. Preferably one outside of Amazon just in case by using the command line you blindly delete your own instance that was running those tools.

command line install: http://www.smartfrog.org/wiki/display/sf/Getting+Started+with+EC2

We will install the latest official Ubuntu 10.10 (Maverick Meerkat) Server 64-bit

If you want other version of Ubuntu, check them out in the Ubuntu EC2 Starter Guide.

1/ Launch an Instance use this AMI: ami-ca1f4f8f, then in “Instance Type” select Micro (t1.micro, 613MB)

Copy the address of the server (ex: ec2-51-28-5-237.us-west-1.compute.amazonaws.com) and log onto it using SSH and your key pair.

2/ Download the tools and unzip them:

bash# wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
bash# unzip ec2-api-tools.zip
bash# cd ec2-api-tools-1.3-62308/
bash# ls
bin  lib  license.txt  notice.txt  THIRDPARTYLICENSE.TXT
bash# cd bin/
bash#

3/ Try to run a basic command line tool

bash# ./ec2-describe-images ami-ca1f4f8f
./bin/ec2-describe-images: line 9: EC2_HOME: EC2_HOME is not set

We need to set the environment variables correctly:

bash# export EC2_HOME=/home/ubuntu/ec2-api-tools-1.3-62308/
bash# ./ec2-api-tools-1.3-62308/bin/ec2-version
/home/ubuntu/ec2-api-tools-1.3-62308//bin/ec2-cmd: line 17: JAVA_HOME: JAVA_HOME is not set

Ouch, the tools are using Java, let’s install it on the machine:

bash# sudo apt-get install openjdk-6-jre
bash# export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

Let’s try it again:

bash# ./ec2-api-tools-1.3-62308/bin/ec2-version
1.3-62308 2010-11-15
bash#

Yes! The command tool works. At least this was a local command that doesn’t connect remotely to retrieve information about your EC2 servers.

Now trying a remote command still fails:

bash# ec2-describe-keypairs
Required option '-K, --private-key KEY' missing (-h for usage)
bash#

In order to use the command line tools we need to authenticate to the Amazon management system, otherwise the command tools don’t have any way to guess for which EC2 account you are issuing the commands to.
And worse if there was no authentication, anybody could mess with your servers.

This is where a lot of people get confused because they will use the private key they use to log using SSH: this is not the keys we want.

That’s where we need to have a X.509 certificate and use the keys associated with it.

To generate a X.509 the certificate:

From the AWS Management Console go to Account (top left) then “Security Credentials” and in “Access Credentials” select the “X.509 Certificates” tab and click on “Create a new Certificate”.

You have successfully created a new X.509 Certificate.

Please download your Private Key file now. You must download your Private Key file (pk-), by clicking the link below before you navigate away from this page. AWS does not store your private key information. You will not be able to download the Private Key file at any other time. If you do not download the Private Key file now, you will have to create a new certificate and private key.

IMPORTANT: You should store your Private Key file in a secure location. If you lose your Private Key file you will need to create a new certificate to use with your account. AWS does not store Private Key Information.

Your Private Key is secret, and should be known only by you. You should never include your Private Key information in a requests to AWS, except encrypted as a signature. You should also never e-mail your Private Key file to anyone. It is important to keep your Private Key confidential to protect your account.

Please download your certificate file. You can download your certificate file now using the link below, or at your convenience from the Security Credentials page.

We need to add the private key of the X.509 certificate…

bash# export EC2_PRIVATE_KEY=~/.ssh/cert_pk-KZG6HODRXZM7NJEZQ5TO5RXTNBPEZAAB.pem
bash# ec2-describe-keypairs
Required option '-C, --cert CERT' missing (-h for usage)
bash#

… and the public key as well:

bash# export EC2_CERT=~/.ssh/cert-KZG6HODRXZM7NJEZQ5TO5RXTNBPEZAAB.pem

If you used the wrong private key (using the SSH one instead of the X.509 CERTIFICATE) you would get this:

bash# export EC2_PRIVATE_KEY=~/.ssh/ssh-private-key.pem <---- NO NO NO!!! do not use the private key used for SSH access, but the Private key of the CERTIFICATE!!!
bash# ec2-describe-keypairs
Client.MalformedSOAPSignature: Invalid SOAP Signature. Failed to check signature with X.509 cert
bash#

So just make sure you use the correct private key from the X.509 certificate, not your SSH private key.

Now all is setup we run the remote command:

bash# ec2-describe-keypairs
bash#

… and nothing happens, nothing is returned, not even an error message.

This is because by default the command line tools use a region that may not host your servers: us-east-1

Add the region where your servers are in the command line and all is fine:

bash# ec2-describe-keypairs --region us-west-1
KEYPAIR ssh1 93:7e:d6:69:97:dc:2c:77:9b:e7:df:d7:fa:5f:1d:1f:dc:f9:9d:35
KEYPAIR ssh2 95:c4:55:d4:65:d4:76:38:ce:e2:9e:47:1a:1b:68:ac:21:79:37:1c
KEYPAIR ssh3 87:a2:f1:51:37:f6:32:ee:33:d4:48:74:41:97:76:99:87:41:ae:f5
bash#

Watch out not to add the a/b/c in the region. For servers actually in us-west-1b, do not use
–region us-west-1b
but only
–region us-west-1
otherwise you will have the same problem

To make it easier, add you default region to the shell variable:

bash# export EC2_URL=https://ec2.us-west-1.amazonaws.com

Now we can finally issue commands without using repetitive command line arguments! setup is all done!:

bash# ec2-describe-instances
RESERVATION     r-3b4a969f      782870751849    Web Server
INSTANCE        i-9bd576bd      ami-f61141b3    ec2-180-72-4-113.us-west-1.compute.amazonaws.com        ip-10-162-235-206.us-west-1.compute.internal    running ssh2  0               m1.small        2010-07-28T11:15:02+0000        us-west-1b      aki-3c114179                    monitoring-disabled     180.72.4.113    10.132.217.116    ebs                                      paravirtual     xen
BLOCKDEVICE     /dev/sda1       vol-7d9bfc16    2010-07-28T06:28:04.000Z
TAG     instance        i-9bd576bd      Name    ws00-small
RESERVATION     r-c8fd739c      782870751849    Web Server
INSTANCE        i-7be8523e      ami-ca1f4f8f    ec2-51-18-5-237.us-west-1.compute.amazonaws.com ip-10-170-15-199.us-west-1.compute.internal     running ssh3  0         t1.micro 2010-12-30T01:25:33+0000        us-west-1c      aki-9ba0f1de                    monitoring-disabled     51.18.5.237     10.170.25.122                   ebs               paravirtual      xen
BLOCKDEVICE     /dev/sda1       vol-d8cf42b3    2010-12-30T01:25:54.000Z
TAG     instance        i-7be8523e      Name    dev00-micro
bash#

Now we can finally launch instances with the deleteOnTermination flag set to false:

bash# ec2-run-instances ami-f61141b3 -b dev/sda1=::false
Client.InvalidBlockDeviceMapping: Invalid device name dev/sda1
bash#

and the documentation is incorrect: it’s missing a slash at the beginning of the block device:

bash# ec2-run-instances ami-f61141b3 -b /dev/sda1=::false -v
Setting User-Agent to [ec2-api-tools 1.3-62308]
------------------------------[ REQUEST ]-------------------------------
------------------------------------------------------------------------
------------------------------[ RESPONSE ]------------------------------
RESERVATIONr-e461e9a0782870751849default
INSTANCEi-0ce98d48ami-f61141b3pending0m1.small2011-01-04T01:00:11+0000us-west-1caki-3c114179monitoring-disabledebsparavirtualxen
REQUEST ID5073b725-6f6f-40ec-b3e8-2dbe7e2d0b2d
bash#

We successfully created an instance from the command line with EBS persistence after instance termination.

Here is a more advanced command to start a new instance of type micro and create an extra volume of 20 Gigs:

bash# ec2-run-instances ami-ca1f4f8f -n 1 -t t1.micro -z us-west-1b -b /dev/sdb=:20:false -g 'Web Server' -k 'my_key_pay'

where:
-n 1 means launch only one instance
-t t1.micro is the type of instance (from micro to extra large)
-z us-west-1b specify the exact zone you want the server to run in. It’s important if you bought a reserved instance as they must match the exact same zone.
-b /dev/sdb=:20:false means create an extra volume (not the root partition as it would be sda, here it’s sdb) of 20 gigabytes and false means don’t delete it when the instance terminates
-g ‘Web Server’ is the access group (firewall)
-k ‘my_key_pay’ is your key pair used to SSH into the box

Once launched, you still need to create a partition on this newly created volume /dev/sdb and mount it manually where you want.

To create a partition, use fdisk.
We will create an ext4 partition using the whole 20 gigs:

bash# fdisk -l /dev/sdb

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
bash#
bash# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf725c011.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): l

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      41  PPC PReP Boot   85  Linux extended  c7  Syrinx
 5  Extended        42  SFS             86  NTFS volume set da  Non-FS data
 6  FAT16           4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS       4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility
 8  AIX             4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    50  OnTrack DM      93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       52  CP/M            9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs
 e  W95 FAT16 (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  GPT
 f  W95 Ext'd (LBA) 55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor
12  Compaq diagnost 61  SpeedStor       a9  NetBSD          f4  SpeedStor
14  Hidden FAT16 <3 63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary
16  Hidden FAT16    64  Novell Netware  af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 65  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  70  DiskSecure Mult b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 75  PC/IX           bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 80  Old Minix       be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1

Command (m for help): p

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf725c011

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2610, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610

Command (m for help): p

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf725c011

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
bash#

The partition is created, let’s double check that:

bash# fdisk -l /dev/sdb

Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf725c011

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2610    20964793+  83  Linux
bash#

Now let’s mount it:

bash# ls /mnt/
bash# mkdir /mnt/data
bash# mount /dev/sdb1 /mnt/data/
mount: you must specify the filesystem type
bash#
bash# mount -t ext4 /dev/sdb1 /mnt/data/
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
bash#

Oops we still need to format it to the ext4 filesystem:

bash# mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
bash#

Now we can mount it:

bash# mount -t ext4 /dev/sdb1 /mnt/data/
bash#
bash# mount
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /mnt/data type ext4 (rw)
bash#
bash# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              15G  665M   14G   5% /
none                  290M  116K  290M   1% /dev
none                  297M     0  297M   0% /dev/shm
none                  297M   48K  297M   1% /var/run
none                  297M     0  297M   0% /var/lock
/dev/sdb1              20G  172M   19G   1% /mnt/data
bash#

There it is, our 20G persistent partition is mounted on /mnt/data/ and whatever data we put on it, it will not be destroyed when the instance terminates.

The list of all the ec2 commands (running any command with the –help flag will give you more info):

bash# ls ec2-api-tools-1.3-62308/bin/
ec2-activate-license
ec2actlic
ec2addcgw
ec2adddopt
ec2-add-group
ec2addgrp
ec2addkey
ec2-add-keypair
ec2addpgrp
ec2addsds
ec2addsnap
ec2addsubnet
ec2addtag
ec2addvgw
ec2addvol
ec2addvpc
ec2addvpn
ec2allocaddr
ec2-allocate-address
ec2assocaddr
ec2assocdopt
ec2-associate-address
ec2-associate-dhcp-options
ec2-attach-volume
ec2-attach-vpn-gateway
ec2attvgw
ec2attvol
ec2auth
ec2-authorize
ec2bundle
ec2-bundle-instance
ec2-cancel-bundle-task
ec2-cancel-conversion-task
ec2-cancel-spot-instance-requests
ec2cbun
ec2cct
ec2cim
ec2-cmd
ec2-confirm-product-instance
ec2cpi
ec2-create-customer-gateway
ec2-create-dhcp-options
ec2-create-image
ec2-create-placement-group
ec2-create-snapshot
ec2-create-spot-datafeed-subscription
ec2-create-subnet
ec2-create-tags
ec2-create-volume
ec2-create-vpc
ec2-create-vpn-connection
ec2-create-vpn-gateway
ec2csir
ec2daddr
ec2datt
ec2daz
ec2dbun
ec2dcgw
ec2dct
ec2ddi
ec2ddopt
ec2-deactivate-license
ec2deactlic
ec2delcgw
ec2deldopt
ec2-delete-customer-gateway
ec2-delete-dhcp-options
ec2-delete-disk-image
ec2-delete-group
ec2-delete-keypair
ec2-delete-placement-group
ec2-delete-snapshot
ec2-delete-spot-datafeed-subscription
ec2-delete-subnet
ec2-delete-tags
ec2-delete-volume
ec2-delete-vpc
ec2-delete-vpn-connection
ec2-delete-vpn-gateway
ec2delgrp
ec2delkey
ec2delpgrp
ec2delsds
ec2delsnap
ec2delsubnet
ec2deltag
ec2delvgw
ec2delvol
ec2delvpc
ec2delvpn
ec2dereg
ec2-deregister
ec2-describe-addresses
ec2-describe-availability-zones
ec2-describe-bundle-tasks
ec2-describe-conversion-tasks
ec2-describe-customer-gateways
ec2-describe-dhcp-options
ec2-describe-group
ec2-describe-image-attribute
ec2-describe-images
ec2-describe-instance-attribute
ec2-describe-instances
ec2-describe-keypairs
ec2-describe-licenses
ec2-describe-placement-groups
ec2-describe-regions
ec2-describe-reserved-instances
ec2-describe-reserved-instances-offerings
ec2-describe-snapshot-attribute
ec2-describe-snapshots
ec2-describe-spot-datafeed-subscription
ec2-describe-spot-instance-requests
ec2-describe-spot-price-history
ec2-describe-subnets
ec2-describe-tags
ec2-describe-volumes
ec2-describe-vpcs
ec2-describe-vpn-connections
ec2-describe-vpn-gateways
ec2-detach-volume
ec2-detach-vpn-gateway
ec2detvgw
ec2detvol
ec2dgrp
ec2diatt
ec2dim
ec2dimatt
ec2din
ec2dinatt
ec2disaddr
ec2-disassociate-address
ec2dkey
ec2dlic
ec2dpgrp
ec2dre
ec2dri
ec2drio
ec2dsds
ec2dsir
ec2dsnap
ec2dsnapatt
ec2dsph
ec2dsubnet
ec2dtag
ec2dvgw
ec2dvol
ec2dvpc
ec2dvpn
ec2-fingerprint-key
ec2fp
ec2gcons
ec2-get-console-output
ec2-get-password
ec2gpass
ec2ii
ec2ikey
ec2-import-instance
ec2-import-keypair
ec2-import-volume
ec2iv
ec2kill
ec2matt
ec2miatt
ec2-migrate-image
ec2mim
ec2mimatt
ec2min
ec2minatt
ec2-modify-image-attribute
ec2-modify-instance-attribute
ec2-modify-snapshot-attribute
ec2-monitor-instances
ec2msnapatt
ec2prio
ec2-purchase-reserved-instances-offering
ec2ratt
ec2reboot
ec2-reboot-instances
ec2reg
ec2-register
ec2reladdr
ec2-release-address
ec2-request-spot-instances
ec2-reset-image-attribute
ec2-reset-instance-attribute
ec2-reset-snapshot-attribute
ec2revoke
ec2-revoke
ec2riatt
ec2rimatt
ec2rinatt
ec2rsi
ec2rsnapatt
ec2run
ec2-run-instances
ec2start
ec2-start-instances
ec2stop
ec2-stop-instances
ec2tag
ec2-terminate-instances
ec2udi
ec2umin
ec2-unmonitor-instances
ec2-upload-disk-image
ec2ver
ec2-version
bash#

The API Command Line Tools Reference describes further those commands.

Here are a few useful commands:

bash# ec2-describe-reserved-instances-offerings
OFFERING 248e7b75-fecf-4a63-98d6-d08254494579 us-west-1b c1.medium 3y 700.0 0.145 Windows
OFFERING 3a98bf7d-8643-4ea8-b00d-81b4b7c9bead us-west-1a c1.medium 3y 1084.0 0.093 SUSE Linux
OFFERING e5a2ff3b-14e3-465b-bcc3-211a78af6941 us-west-1a c1.medium 3y 700.0 0.08 Linux/UNIX
OFFERING 60dcfab3-fb68-48ec-a3bb-89260f5db9bb us-west-1a c1.medium 3y 700.0 0.145 Windows
OFFERING d586503b-889e-4183-b679-aefdc496ba5e us-west-1c c1.medium 3y 1084.0 0.093 SUSE Linux
OFFERING e5a2ff3b-0ca5-49ce-864b-1a9327940194 us-west-1c c1.medium 3y 700.0 0.08 Linux/UNIX
OFFERING 3a98bf7d-69ef-4454-822d-af84a439f655 us-west-1b c1.medium 3y 700.0 0.08 Linux/UNIX
OFFERING e5a2ff3b-25b4-4165-9b5e-07360c24772b us-west-1b c1.medium 3y 1084.0 0.093 SUSE Linux
OFFERING 248e7b75-b500-4227-aca8-4ef0f5cfc905 us-west-1c c1.medium 3y 700.0 0.145 Windows
OFFERING 4b2293b4-5644-4800-b494-1d3471812e2d us-west-1b c1.medium 1y 455.0 0.145 Windows
OFFERING 4b2293b4-bdf5-421e-a4fd-0b212032c1da us-west-1a c1.medium 1y 455.0 0.08 Linux/UNIX
OFFERING 60dcfab3-284a-40d6-a025-c06f143031e4 us-west-1a c1.medium 1y 647.0 0.093 SUSE Linux
OFFERING d586503b-52b6-4b99-9cc4-afe0af70b4e3 us-west-1a c1.medium 1y 455.0 0.145 Windows
OFFERING 649fd0c8-5c3e-41c1-8f4c-9c725e0d98dc us-west-1c c1.medium 1y 647.0 0.093 SUSE Linux
OFFERING d586503b-3294-4fde-b463-9c2f2822e6b7 us-west-1c c1.medium 1y 455.0 0.08 Linux/UNIX
OFFERING c48ab04c-2d4c-4e95-aeb2-ab307d27b4fd us-west-1b c1.medium 1y 455.0 0.08 Linux/UNIX
OFFERING e5a2ff3b-19db-4879-8342-42742b3b92b0 us-west-1b c1.medium 1y 647.0 0.093 SUSE Linux
OFFERING e5a2ff3b-afa6-4a50-a375-85a793e2c023 us-west-1c c1.medium 1y 455.0 0.145 Windows
OFFERING 60dcfab3-1121-4969-b62c-cdfecabc9f23 us-west-1a c1.xlarge 3y 2800.0 0.58 Windows
OFFERING 60dcfab3-afef-40be-85e3-c1f44510a02a us-west-1a c1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING ceb6a579-aad2-430f-b8c3-358f0f8f8e4c us-west-1a c1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING 4b2293b4-e481-4254-9534-1921e8ac3972 us-west-1b c1.xlarge 3y 2800.0 0.58 Windows
OFFERING 438012d3-8b63-4914-aed5-115b3a8e7025 us-west-1c c1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING d586503b-2586-4e53-8f01-29e6dd5e546d us-west-1c c1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING 248e7b75-a3c7-46b7-95a0-13ac073370d4 us-west-1b c1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING 649fd0c8-57fb-4b6b-8d76-db4ffedda413 us-west-1b c1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING 248e7b75-9098-455d-8b23-561f6b74d536 us-west-1c c1.xlarge 3y 2800.0 0.58 Windows
OFFERING 649fd0c8-a1f1-4237-9050-db8a08eb8573 us-west-1a c1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING c48ab04c-a2ef-44dd-8ec8-01ed7810ae98 us-west-1a c1.xlarge 1y 1820.0 0.58 Windows
OFFERING c48ab04c-ca54-4ed2-8fcb-5952f9e4b566 us-west-1a c1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING 649fd0c8-e61d-4a26-b793-506813fbb7f6 us-west-1b c1.xlarge 1y 1820.0 0.58 Windows
OFFERING 649fd0c8-f67b-46fd-ba42-85eb642b498e us-west-1c c1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING d586503b-12b9-463a-90c3-e23b6e93c459 us-west-1c c1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING 3a98bf7d-a4ef-4120-8f4a-0e5a21063e46 us-west-1b c1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING c48ab04c-a7f3-41b0-9336-a00217247748 us-west-1b c1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING 3a98bf7d-763c-4709-b293-f892ef1bcadc us-west-1c c1.xlarge 1y 1820.0 0.58 Windows
OFFERING 438012d3-d6ab-4d09-b130-c2ac1b4010b2 us-west-1a m1.large 3y 1400.0 0.24 Windows
OFFERING 649fd0c8-712c-4b33-ba23-1d9b0c9b6252 us-west-1a m1.large 3y 1400.0 0.16 Linux/UNIX
OFFERING e5a2ff3b-92a8-4952-a932-8dfb18d2665b us-west-1a m1.large 3y 1784.0 0.173 SUSE Linux
OFFERING 248e7b75-0884-42f4-9ab4-4edd3b48f9d5 us-west-1c m1.large 3y 1784.0 0.173 SUSE Linux
OFFERING ceb6a579-32b9-4ec2-893c-f4553623a734 us-west-1c m1.large 3y 1400.0 0.24 Windows
OFFERING d586503b-7196-46bf-bc0c-9c756b4e78c5 us-west-1c m1.large 3y 1400.0 0.16 Linux/UNIX
OFFERING 438012d3-aa27-40bb-9bdf-9ec1cfc08970 us-west-1b m1.large 3y 1400.0 0.24 Windows
OFFERING 60dcfab3-2842-43cb-a33b-881ece819f03 us-west-1b m1.large 3y 1784.0 0.173 SUSE Linux
OFFERING 649fd0c8-c280-4097-b320-101350751a74 us-west-1b m1.large 3y 1400.0 0.16 Linux/UNIX
OFFERING 438012d3-ead2-41d0-8b7b-2652a1e0beb4 us-west-1a m1.large 1y 1102.0 0.173 SUSE Linux
OFFERING 4b2293b4-0f80-4a40-90de-a9f3c0267c4b us-west-1a m1.large 1y 910.0 0.16 Linux/UNIX
OFFERING d586503b-90d0-401f-ae70-931945c1071d us-west-1a m1.large 1y 910.0 0.24 Windows
OFFERING 3a98bf7d-578b-43f5-b7c4-ae9c0589f46b us-west-1c m1.large 1y 910.0 0.16 Linux/UNIX
OFFERING 438012d3-1251-406e-8598-59b24faa1542 us-west-1c m1.large 1y 910.0 0.24 Windows
OFFERING d586503b-64b3-460c-a33e-558c122b5786 us-west-1c m1.large 1y 1102.0 0.173 SUSE Linux
OFFERING 248e7b75-c4be-4fdf-8536-e2a06c5458e2 us-west-1b m1.large 1y 1102.0 0.173 SUSE Linux
OFFERING 4b2293b4-cbc1-444b-a80e-098e16c64acc us-west-1b m1.large 1y 910.0 0.24 Windows
OFFERING 649fd0c8-8f20-448a-a76c-c4395823ad9b us-west-1b m1.large 1y 910.0 0.16 Linux/UNIX
OFFERING d586503b-eee9-492b-a608-6584b5f029f4 us-west-1a m1.small 3y 350.0 0.06 Windows
OFFERING 4b2293b4-de4d-497a-850f-07044ed0433d us-west-1c m1.small 3y 350.0 0.04 Linux/UNIX
OFFERING d586503b-2261-4e7a-9e7e-92265de0ab1d us-west-1c m1.small 3y 542.0 0.053 SUSE Linux
OFFERING 3a98bf7d-4150-481e-9737-db1c93e3d5cf us-west-1a m1.small 3y 542.0 0.053 SUSE Linux
OFFERING 649fd0c8-f478-4b2b-87d3-d2e77da3a2dc us-west-1a m1.small 3y 350.0 0.04 Linux/UNIX
OFFERING 248e7b75-fb18-4ec9-9e60-e03295c769e2 us-west-1c m1.small 3y 350.0 0.06 Windows
OFFERING 438012d3-55f4-4c33-a656-bfbabc9d5aa4 us-west-1b m1.small 3y 542.0 0.053 SUSE Linux
OFFERING 4b2293b4-c0a1-414e-9639-8e59ad7955f1 us-west-1b m1.small 3y 350.0 0.04 Linux/UNIX
OFFERING 4b2293b4-ce9d-4412-8171-a67ffda12482 us-west-1b m1.small 3y 350.0 0.06 Windows
OFFERING 438012d3-4d05-440b-908b-39e7b8752e8c us-west-1a m1.small 1y 227.5 0.06 Windows
OFFERING 4b2293b4-def5-468b-ae97-63886afe7a09 us-west-1c m1.small 1y 227.5 0.04 Linux/UNIX
OFFERING c48ab04c-9a74-47c7-bcee-e025def86d4a us-west-1c m1.small 1y 323.5 0.053 SUSE Linux
OFFERING c48ab04c-446f-416d-b7e1-75db17b1354c us-west-1a m1.small 1y 227.5 0.04 Linux/UNIX
OFFERING e5a2ff3b-ffc8-4535-a135-da556ae5fdce us-west-1a m1.small 1y 323.5 0.053 SUSE Linux
OFFERING e5a2ff3b-6fdc-43d6-bc05-84939f24d9e7 us-west-1c m1.small 1y 227.5 0.06 Windows
OFFERING 438012d3-9fdb-4fce-bc9e-73375e4ec640 us-west-1b m1.small 1y 227.5 0.06 Windows
OFFERING ceb6a579-d22c-499b-9d6f-f713613dc823 us-west-1b m1.small 1y 323.5 0.053 SUSE Linux
OFFERING e5a2ff3b-79b4-4217-8c93-ebf1d633dd6e us-west-1b m1.small 1y 227.5 0.04 Linux/UNIX
OFFERING 4b2293b4-811c-4337-9908-b0ea68174a03 us-west-1a m1.xlarge 3y 2800.0 0.48 Windows
OFFERING d586503b-9a7e-4d02-afef-51137be47dba us-west-1c m1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING e5a2ff3b-4e15-499a-9c0b-8d948dd23803 us-west-1c m1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING 438012d3-c84a-4a4f-a89f-a32f8aea17cb us-west-1a m1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING e5a2ff3b-5e2c-487e-a3c9-5f06465c2e28 us-west-1a m1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING e5a2ff3b-44df-4be3-8f2a-0a87e6aaecf7 us-west-1c m1.xlarge 3y 2800.0 0.48 Windows
OFFERING 438012d3-0b70-4048-9b9b-2a057d60cdf1 us-west-1b m1.xlarge 3y 2800.0 0.48 Windows
OFFERING 438012d3-dfe9-493e-8df7-ab52c2a2a258 us-west-1b m1.xlarge 3y 3184.0 0.333 SUSE Linux
OFFERING c48ab04c-c9a3-4a4c-a53a-a99dfb679d95 us-west-1b m1.xlarge 3y 2800.0 0.32 Linux/UNIX
OFFERING 3a98bf7d-0801-4cee-8fea-27349790d202 us-west-1a m1.xlarge 1y 1820.0 0.48 Windows
OFFERING 4b2293b4-426e-4776-9a30-b95fae8dd43e us-west-1c m1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING d586503b-e9aa-477a-ad35-375814077e83 us-west-1c m1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING 649fd0c8-1eb6-42e2-aafd-efccab7508fa us-west-1a m1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING d586503b-f42e-41b2-ba2b-136afd87fb7d us-west-1a m1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING d586503b-2496-4972-9684-6a46eabc988d us-west-1c m1.xlarge 1y 1820.0 0.48 Windows
OFFERING 248e7b75-3920-47b7-88c4-40ab6be507c5 us-west-1b m1.xlarge 1y 1820.0 0.32 Linux/UNIX
OFFERING 248e7b75-6a75-4cb3-bf24-e13746027c67 us-west-1b m1.xlarge 1y 2012.0 0.333 SUSE Linux
OFFERING c48ab04c-5b56-4c62-80aa-ee61b1fba523 us-west-1b m1.xlarge 1y 1820.0 0.48 Windows
OFFERING e5a2ff3b-94d3-4109-a064-44f5de4951ef us-west-1b m2.2xlarge 3y 4000.0 0.64 Windows
OFFERING 248e7b75-5d78-4d92-b033-8f822562012b us-west-1a m2.2xlarge 3y 4384.0 0.493 SUSE Linux
OFFERING 4b2293b4-f7d8-4615-a9bb-99e55c2ed87a us-west-1a m2.2xlarge 3y 4000.0 0.48 Linux/UNIX
OFFERING 60dcfab3-a02c-4f7d-b66f-90ae8c4b22c3 us-west-1c m2.2xlarge 3y 4384.0 0.493 SUSE Linux
OFFERING 649fd0c8-9009-40da-8f66-c66287ecc63e us-west-1c m2.2xlarge 3y 4000.0 0.64 Windows
OFFERING ceb6a579-06cb-48b2-a1ce-76b116cc825d us-west-1c m2.2xlarge 3y 4000.0 0.48 Linux/UNIX
OFFERING d586503b-ede4-4e66-96a4-87ec21480583 us-west-1b m2.2xlarge 3y 4384.0 0.493 SUSE Linux
OFFERING e5a2ff3b-6bf7-4a0f-a888-ffc8729d6258 us-west-1b m2.2xlarge 3y 4000.0 0.48 Linux/UNIX
OFFERING 4b2293b4-372b-4825-b443-7e184067b64f us-west-1a m2.2xlarge 3y 4000.0 0.64 Windows
OFFERING 4b2293b4-656f-4273-b13e-2e67e2e8aecb us-west-1b m2.2xlarge 1y 2650.0 0.64 Windows
OFFERING 4b2293b4-60a5-43b4-b144-e87c50aa7aef us-west-1a m2.2xlarge 1y 2650.0 0.48 Linux/UNIX
OFFERING 60dcfab3-f685-45d5-8f48-6ea60a84db51 us-west-1a m2.2xlarge 1y 2842.0 0.493 SUSE Linux
OFFERING 248e7b75-af17-458a-a655-9a13b091ef7f us-west-1c m2.2xlarge 1y 2650.0 0.48 Linux/UNIX
OFFERING 60dcfab3-6589-452d-8466-93eeb1fb6c5e us-west-1c m2.2xlarge 1y 2650.0 0.64 Windows
OFFERING d586503b-ca0a-4e30-a136-69497c3e5afc us-west-1c m2.2xlarge 1y 2842.0 0.493 SUSE Linux
OFFERING ceb6a579-3191-41a9-bc3b-2134fed5d477 us-west-1b m2.2xlarge 1y 2842.0 0.493 SUSE Linux
OFFERING ceb6a579-3f21-4a5d-8db5-f0058ca0b787 us-west-1b m2.2xlarge 1y 2650.0 0.48 Linux/UNIX
OFFERING 4b2293b4-efda-4c19-906f-e95b51b68c8d us-west-1a m2.2xlarge 1y 2650.0 0.64 Windows
OFFERING 438012d3-5c1d-41a3-847c-2f7e5595c71d us-west-1a m2.4xlarge 3y 8384.0 0.973 SUSE Linux
OFFERING 438012d3-66ad-4b4c-8a05-561d7252c80f us-west-1a m2.4xlarge 3y 8000.0 0.96 Linux/UNIX
OFFERING 60dcfab3-4d52-455d-87ab-022830f2a88e us-west-1a m2.4xlarge 3y 8000.0 1.28 Windows
OFFERING 248e7b75-59d8-4f86-9f0c-6e3197c1d4b0 us-west-1b m2.4xlarge 3y 8000.0 0.96 Linux/UNIX
OFFERING 4b2293b4-a42a-47d6-b85a-5cfd04597605 us-west-1b m2.4xlarge 3y 8384.0 0.973 SUSE Linux
OFFERING 60dcfab3-6264-4875-9311-6d0d99686117 us-west-1b m2.4xlarge 3y 8000.0 1.28 Windows
OFFERING 3a98bf7d-1da6-4c14-97eb-d1e1b92be61a us-west-1c m2.4xlarge 3y 8000.0 0.96 Linux/UNIX
OFFERING c48ab04c-d1f5-49df-8973-e2cd4942a0ac us-west-1c m2.4xlarge 3y 8000.0 1.28 Windows
OFFERING e5a2ff3b-af5f-4ae2-9908-415519474fe2 us-west-1c m2.4xlarge 3y 8384.0 0.973 SUSE Linux
OFFERING ceb6a579-746b-4a81-9382-78f184c49299 us-west-1a m2.4xlarge 1y 5300.0 1.28 Windows
OFFERING d586503b-d5ed-43ec-8f42-ae650afc07de us-west-1a m2.4xlarge 1y 5300.0 0.96 Linux/UNIX
OFFERING e5a2ff3b-2dd2-4354-bbd2-6f889dafe3a8 us-west-1a m2.4xlarge 1y 5492.0 0.973 SUSE Linux
OFFERING 438012d3-a41e-4027-a69e-e59dc7496c0d us-west-1b m2.4xlarge 1y 5300.0 0.96 Linux/UNIX
OFFERING 649fd0c8-82e6-43fe-9c27-dcb2352030f5 us-west-1b m2.4xlarge 1y 5300.0 1.28 Windows
OFFERING 649fd0c8-a6dd-49a4-bd37-2ce39ddc83eb us-west-1b m2.4xlarge 1y 5492.0 0.973 SUSE Linux
OFFERING 4b2293b4-c3db-4734-9f0e-d54b84c17c82 us-west-1c m2.4xlarge 1y 5300.0 0.96 Linux/UNIX
OFFERING ceb6a579-3cfe-4394-acbf-d91a3e2aeab8 us-west-1c m2.4xlarge 1y 5300.0 1.28 Windows
OFFERING e5a2ff3b-9f70-4697-a29d-2ad0c4473536 us-west-1c m2.4xlarge 1y 5492.0 0.973 SUSE Linux
OFFERING 4b2293b4-53d0-4cd4-a3ba-22e7749ba1ed us-west-1a m2.xlarge 3y 2000.0 0.24 Linux/UNIX
OFFERING c48ab04c-4e4d-4d96-9fb4-bb2a75fff490 us-west-1a m2.xlarge 3y 2384.0 0.253 SUSE Linux
OFFERING e5a2ff3b-1686-41ef-bd5d-ad6b5b4aa8cd us-west-1a m2.xlarge 3y 2000.0 0.32 Windows
OFFERING d586503b-072b-40a5-a5ab-8ed92c639453 us-west-1b m2.xlarge 3y 2000.0 0.24 Linux/UNIX
OFFERING d586503b-7541-4b2f-af5f-bdf42fc616d7 us-west-1b m2.xlarge 3y 2384.0 0.253 SUSE Linux
OFFERING 649fd0c8-eb8e-413a-ac2d-d0ced3e5e5cc us-west-1c m2.xlarge 3y 2000.0 0.32 Windows
OFFERING e5a2ff3b-3f14-448c-8003-851fb14477b0 us-west-1b m2.xlarge 3y 2000.0 0.32 Windows
OFFERING 649fd0c8-c95d-4cda-af98-4003da41df5e us-west-1c m2.xlarge 3y 2000.0 0.24 Linux/UNIX
OFFERING d586503b-7da1-478f-8bbd-356d87650c8e us-west-1c m2.xlarge 3y 2384.0 0.253 SUSE Linux
OFFERING 248e7b75-4a86-4116-a9bc-fa00be5644cd us-west-1a m2.xlarge 1y 1517.0 0.253 SUSE Linux
OFFERING 4b2293b4-4391-4962-9a70-4c039ed0f9ed us-west-1a m2.xlarge 1y 1325.0 0.32 Windows
OFFERING c48ab04c-892f-4dd3-862e-1a965902a5c4 us-west-1a m2.xlarge 1y 1325.0 0.24 Linux/UNIX
OFFERING 3a98bf7d-8dac-424e-ae4e-1fcd8162c2ef us-west-1b m2.xlarge 1y 1517.0 0.253 SUSE Linux
OFFERING 60dcfab3-2692-42e0-8268-e093fb454f0e us-west-1b m2.xlarge 1y 1325.0 0.24 Linux/UNIX
OFFERING 438012d3-394d-4643-b630-594504d28105 us-west-1c m2.xlarge 1y 1325.0 0.32 Windows
OFFERING 438012d3-febe-48a2-85a3-a3b83cf024d0 us-west-1b m2.xlarge 1y 1325.0 0.32 Windows
OFFERING d586503b-8d49-4f59-9248-8e9b38438a43 us-west-1c m2.xlarge 1y 1325.0 0.24 Linux/UNIX
OFFERING e5a2ff3b-6d09-4950-ba23-704dea7f307c us-west-1c m2.xlarge 1y 1517.0 0.253 SUSE Linux
OFFERING 438012d3-dd1c-4cb9-b3c7-5b2649068f97 us-west-1a t1.micro 3y 82.0 0.016 Windows
OFFERING 60dcfab3-4ad8-4471-ad3f-e144eba6b86d us-west-1a t1.micro 3y 82.0 0.01 Linux/UNIX
OFFERING d586503b-9515-42e8-b735-692c1ed45553 us-west-1a t1.micro 3y 130.0 0.016 SUSE Linux
OFFERING 4b2293b4-7796-4a96-9bbc-77615d11560a us-west-1b t1.micro 3y 82.0 0.016 Windows
OFFERING 4b2293b4-2879-4536-9f5e-d2f141499e30 us-west-1c t1.micro 3y 130.0 0.016 SUSE Linux
OFFERING 60dcfab3-f8db-44d4-87d7-ece0c0ccccd2 us-west-1c t1.micro 3y 82.0 0.01 Linux/UNIX
OFFERING 438012d3-4941-4053-8d06-f4fbfbcc97b1 us-west-1b t1.micro 3y 130.0 0.016 SUSE Linux
OFFERING c48ab04c-e86d-4202-aa1a-ff58e5cf28e5 us-west-1b t1.micro 3y 82.0 0.01 Linux/UNIX
OFFERING 248e7b75-3da5-4224-9c35-bfd7b1c63e96 us-west-1c t1.micro 3y 82.0 0.016 Windows
OFFERING 649fd0c8-4060-461b-b235-f8c4d67aa033 us-west-1a t1.micro 1y 54.0 0.01 Linux/UNIX
OFFERING e5a2ff3b-4257-465b-b866-adf9e0076616 us-west-1a t1.micro 1y 54.0 0.016 Windows
OFFERING e5a2ff3b-946e-4a22-8874-86033249acca us-west-1a t1.micro 1y 78.0 0.016 SUSE Linux
OFFERING 4b2293b4-6e45-4bbd-9490-578eaef63404 us-west-1b t1.micro 1y 54.0 0.016 Windows
OFFERING 4b2293b4-6c39-4224-900c-2fecf00e8b26 us-west-1c t1.micro 1y 78.0 0.016 SUSE Linux
OFFERING d586503b-798b-4d2a-9650-aa1151f00640 us-west-1c t1.micro 1y 54.0 0.01 Linux/UNIX
OFFERING 4b2293b4-290e-471b-b88b-b42f342da361 us-west-1b t1.micro 1y 78.0 0.016 SUSE Linux
OFFERING c48ab04c-3be6-4794-ab81-5fb2109c4e28 us-west-1b t1.micro 1y 54.0 0.01 Linux/UNIX
OFFERING 438012d3-f048-4d43-bb9b-7b443a6aa001 us-west-1c t1.micro 1y 54.0 0.016 Windows
bash#

bash# ec2-describe-reserved-instances
RESERVEDINSTANCES 92cbaca2-e3b7-37ab-aa5b-c7c7e230edeb us-west-1c t1.micro Linux/UNIX 1y 54.0 0.01 1 2010-01-04T01:14:56+0000 active

Unleash the power of Graphic Cards computation in the cloud: Amazon EC2 announcing Cluster GPU instances

Monday, November 15th, 2010

Just fresh from Amazon, that’s gonna be a lot of fun!

It’s CUDA in the cloud, nice.

We are excited to announce the immediate availability of Cluster GPU Instances for Amazon EC2, a new instance type designed to deliver the power of GPU processing in the cloud. GPUs are increasingly being used to accelerate the performance of many general purpose computing problems. However, for many organizations, GPU processing has been out of reach due to the unique infrastructural challenges and high cost of the technology. Amazon Cluster GPU Instances remove this barrier by providing developers and businesses immediate access to the highly tuned compute performance of GPUs with no upfront investment or long-term commitment.

Amazon Cluster GPU Instances provide 22 GB of memory, 33.5 EC2 Compute Units, and utilize the Amazon EC2 Cluster network, which provides high throughput and low latency for High Performance Computing (HPC) and data intensive applications. Each GPU instance features two NVIDIA Tesla® M2050 GPUs, delivering peak performance of more than one trillion double-precision FLOPS. Many workloads can be greatly accelerated by taking advantage of the parallel processing power of hundreds of cores in the new GPU instances. Many industries including oil and gas exploration, graphics rendering and engineering design are using GPU processors to improve the performance of their critical applications.

Amazon Cluster GPU Instances extend the options for running HPC workloads in the AWS cloud. Cluster Compute Instances, launched earlier this year, provide the ability to create clusters of instances connected by a low latency, high throughput network. Cluster GPU Instances give customers with HPC workloads an additional option to further customize their high performance clusters in the cloud. For those customers who have applications that can benefit from the parallel computing power of GPUs, Amazon Cluster GPU Instances can often lead to even further efficiency gains over what can be achieved with traditional processors. By leveraging both instance types, HPC customers can tailor their compute cluster to best meet the performance needs of their workloads. For more information on HPC capabilities provided by Amazon EC2, visit aws.amazon.com/ec2/hpc-applications.

At $2.10 per hour (and $5630 with a one-year contract or $8650 for 3 years), it’s the most expensive instance you can get, and of course the beefiest one.

Operating this server for a full year would cost you $18,396 without contract, or $12,112 ($5,630 up front plus $6,482 of usage) with a one year contract.

Here is the description of the instance:

Instances of this family provide general-purpose graphics processing units (GPUs) with proportionally high CPU and increased network performance for applications benefitting from highly parallelized processing, including HPC, rendering and media processing applications. While Cluster Compute Instances provide the ability to create clusters of instances connected by a low latency, high throughput network, Cluster GPU Instances provide an additional option for applications that can benefit from the efficiency gains of the parallel computing power of GPUs over what can be achieved with traditional processors. Learn more about use of this instance type for HPC applications.

The Cluster GPU instance family currently contains a single instance type, the Cluster GPU Quadruple Extra Large with the following specifications:

22 GB of memory
33.5 EC2 Compute Units (2 x Intel Xeon X5570, quad-core “Nehalem” architecture)
2 x NVIDIA Tesla “Fermi” M2050 GPUs
1690 GB of instance storage
64-bit platform
I/O Performance: Very High (10 Gigabit Ethernet)
API name: cg1.4xlarge

Note: One EC2 Compute Unit (ECU) provides the equivalent CPU capacity of a 1.0-1.2 GHz 2007 Opteron or 2007 Xeon processor.

The Amazon EC2 Cluster Compute and Cluster GPU instance types are specifically designed to combine high compute performance with high performance network capability to meet the needs of HPC applications. Unique to Cluster Compute and Cluster GPU instances is the ability to group them into clusters of instances for use with HPC applications. This is particularly valuable for those applications that rely on protocols like Message Passing Interface (MPI) for tightly coupled inter-node communication.

Cluster Compute and Cluster GPU instances function just like other Amazon EC2 instances but also offer the following features for optimal performance with HPC applications:

When run as a cluster of instances, they provide low latency, full bisection 10 Gbps bandwidth between instances. Cluster sizes up through and above 128 instances are supported.
Cluster Compute and Cluster GPU instances include the specific processor architecture in their definition to allow developers to tune their applications by compiling applications for that specific processor architecture in order to achieve optimal performance.

This opens the doors to heavy video processing, 3D rendering, SETI-type parallel processing directly in the cloud.

Update 11/16: And people are already using it to crack passwords demonstrating how easy it has become to break SHA1.