| Did this page help you? Yes No Tell us about it... |
To use Amazon EBS, you first create a volume that can be attached to any Amazon EC2 instance within the same Availability Zone. You can create an Amazon EBS volume with data from a snapshot stored in Amazon S3 or as a new blank volume with no data. You can also create and attach Amazon EBS volumes when you launch instances. For more information on volumes and snapshots, see Amazon Elastic Block Store. The following procedure walks you through the process of creating an Amazon EBS volume from a snapshot.
To create an Amazon EBS volume
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Click Volumes in the Navigation pane.
The console displays a list of current volumes.
Click Create Volume.
The Create Volume dialog box appears.
Configure the following settings and click Create.
Size of the volume (in GiB)
Availability Zone in which to launch the instance
The ID of the snapshot from which you are launching the volume (optional)
![]() | Note |
|---|---|
If you specify both a volume size and a snapshot ID, the size must be equal to or greater than the snapshot size. |
Amazon EC2 begins creating the volume.
New volumes created from existing Amazon S3 snapshots load lazily in the background. This means that after a volume is created from a snapshot, there is no need to wait for all of the data to transfer from Amazon S3 to your Amazon EBS volume before your attached instance can start accessing the volume and all of its data. If your instance accesses data that hasn’t yet been loaded, the volume will immediately download the requested data from Amazon S3, and then will continue loading the rest of the data in the background.
Accessing data for the first time from Amazon S3 might cause latency during the loading period. To avoid the possibility of an increased latency during the background loading of the data, you first access/read all performance-critical data from the volume (or read the entire volume) to ensure it has been loaded to the EBS volume from Amazon S3 before running the application.
To create an Amazon EBS volume
Enter the following command.
PROMPT>ec2-create-volume --size 80 --availability-zone us-east-1a
Amazon EC2 returns information about the volume that is similar to the following example.
VOLUME vol-c7f95aae 80 us-east-1a creating 2010-03-30T13:54:37+0000
To check whether the volume is ready, use the following command.
PROMPT>ec2-describe-volumesvolume_id
Amazon EC2 returns information about the volume that is similar to the following example.
VOLUME vol-c7f95aae 80 us-east-1a available 2010-03-30T13:54:37+0000
To create an Amazon EBS volume
Construct the following Query request.
https://ec2.amazonaws.com/ ?Action=CreateVolume &Size=size&AvailabilityZone=zone&...auth parameters...
Following is an example response.
<CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/"> <requestId>06eabcdf-95b8-424f-87dc-da8e976f7858</requestId> <volumeId>vol-d11fbbb8</volumeId> <size>80</size> <snapshotId/> <availabilityZone>us-east-1a</availabilityZone> <status>creating</status> <createTime>2010-03-23T09:16:24.000Z</createTime> </CreateVolumeResponse>