Amazon Cloud Configuration
Amazon EBS is designed to allow you to attach any instance to a storage volume. In the event you experience an instance failure, your Amazon EBS volume automatically detaches with your data intact. You can then reattach the volume to a new instance and quickly recover.

To configure and use Amazon EBS, we provide eight new API functions. This section provides a brief overview of each function.

API List
This function does not delete any snapshots that were created from this volume.
A volume can only be attached to a single instance at any time. The volume and instance must be in the same Availability Zone and the instance must be running.
This operation does not delete the volume. The volume can be attached to another instance and will have the same data as when it was detached.
Once created, you can use the snapshot to create volumes that contain exactly the same data as the original volume.
This function does not affect currently running Amazon EBS volumes, regardless of whether they were used to create the snapshot or were derived from the snapshot.
Creating Amazon EBS Volumes and Snapshots
To use Amazon EBS, you first create a volume that can be attached to any Amazon EC2 instance within the same Availability Zone. This example creates an 800 GiB Amazon EBS volume.
To create an Amazon EBS volume
PROMPT> ec2-create-volume –size 800 –zone us-east-1a
Amazon EBS returns information about the volume similar to the following example.
VOLUME vol-4d826724 800 us-east-1a available 2008-02-14T00:00:00+0000
PROMPT> ec2-describe-volumes vol-4d826724
Amazon EBS returns information about the volume similar to the following example.
VOLUME vol-4d826724 800 us-east-1a available 2008-07-29T08:49:25+0000
This section describes how to attach a volume that you created to an instance.
To attach an Amazon EBS volume
PROMPT> ec2-attach-volume volume_id -i instance_id -d device
Amazon EBS returns information similar to the following.
ATTACHMENT volume_id instance_id device attaching date_time
This example attaches volume vol-4d826724 to instance i-6058a509 in Linux and UNIX and exposes it as device /dev/sdh.
PROMPT> ec2-attach-volume vol-4d826724 -i i-6058a509 -d /dev/sdh
ATTACHMENT vol-4d826724 i-6058a509 /dev/sdh attaching 2008-02-14T00:15:00+0000
This example attaches volume vol-4d826724 to instance i-6058a509 in Windows and exposes it as device xvdf.
PROMPT> ec2-attach-volume vol-4d826724 -i i-6058a509 -d xvdf
ATTACHMENT vol-4d826724 i-6058a509 xvdf attaching 2008-02-14T00:15:00+0000
NoteDescribing Volumes and Instances
After creating Amazon EBS volumes and attaching them to instances, you can list them using the DescribeVolumes and the DescribeInstances operations.
DescribeVolumes returns the volume ID, capacity, status (in-use or available) and creation time of each volume. If the volume is attached, an attachment line shows the volume ID, the instance ID to which the volume is attached, the device name exposed to the instance, its status (attaching, attached, detaching, detached), and when it attached.
DescribeInstances lists volumes that are attached to running instances.
To describe volumes
PROMPT> ec2-describe-volumes
Amazon EBS returns information about all volumes that you own.
VOLUME vol-4d826724 us-east-1a 800 in-use 2008-02-14T00:00:00+0000
ATTACHMENT vol-4d826724 i-6058a509 /dev/sdh attached 2008-02-14T00:00:17+0000
VOLUME vol-50957039 13 us-east-1a available 2008-02-091T00:00:00+0000
VOLUME vol-6682670f 1 us-east-1a in-use 2008-02-11T12:00:00+0000
ATTACHMENT vol-6682670f i-69a54000 /dev/sdh attached 2008-02-11T13:56:00+0000
To describe instances
PROMPT> ec2-describe-instances
Amazon EBS returns information about all running instances and volumes attached to those instances.
RESERVATION r-e112fc88 416161254515 default
INSTANCE i-3b887c52 ami-3fd13456 ec2-67-202-27-216.compute-1.amazonaws.com domU-12-31-38-00-35-94.compute-1.internal
running gsg-keypair 0 m1.small 2007-11-26T13:20:35+0000 windows vol-4d826724
RESERVATION r-e612fc8f 416161254515 default
INSTANCE i-21b63c22 ami-3fd13456 ec2-67-202-18-227.compute-1.amazonaws.com domU-12-31-38-00-39-28.compute-1.internal
running gsg-keypair 0 m1.small 2007-11-26T13:21:51+0000 windows vol-6682670f
Using an Amazon EBS Volume within an Instance
Inside the instance, the Amazon EBS volume is exposed as a normal block device and can be formatted as any file system and mounted.
This section describes how to make a volume available to the Linux and UNIX operating system.
To create an ext3 file system on the Amazon EBS volume and mount it as /mnt/data-store
$ yes | mkfs -t ext3 /dev/sdh
$ mkdir /mnt/data-store
$ mount /dev/sdh /mnt/data-store
Any data written to this file system is written to the Amazon EBS volume and is transparent to applications using the device.
Inside the instance, the Amazon EBS volume is exposed as a normal block device and can be formatted as any file system and mounted.
This section describes how to make a volume available to the Linux and UNIX operating system.
To create an ext3 file system on the Amazon EBS volume and mount it as /mnt/data-store
$ yes | mkfs -t ext3 /dev/sdh
$ mkdir /mnt/data-store
$ mount /dev/sdh /mnt/data-store
Any data written to this file system is written to the Amazon EBS volume and is transparent to applications using the device.
For more information please contact Daniel Brody @ Steelman