ec2-create-volume
Description
Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone. For more information about Amazon EBS, go to the
Note | |
---|---|
You must specify an Availability Zone when creating a volume. The volume and the instance to which it attaches must be in the same Availability Zone. |
Syntax
ec2-create-volume [--size
size
| --snapshot snapshot
] --availability-zone zone
Options
Name | Description | Required |
---|---|---|
|
The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot. Type: String Default: None Valid Values: Example: 800 |
Yes |
|
The snapshot from which to create the new volume. Type: String Default: None Example: snap-78a54011 |
No |
|
The Availability Zone in which to create the new volume. Type: String Default: None Example: us-east-1a |
Yes |
Output
The command returns a table that contains the following information:
-
VOLUME identifier
-
ID of the volume
-
Size of the volume, in GiBs
-
Snapshot from which the volume was created, if applicable
-
Availability Zone in which the volume was created
-
Volume state (e.g., creating, available, in use, deleting, error)
-
Time stamp when volume creation was initiated
Amazon EC2 displays errors on stderr.
Examples
Example Request
This example creates a new 800 GiB volume in Availability Zone us-east-1a
.
PROMPT>ec2-create-volume --size 800 --availability-zone us-east-1a
VOLUME vol-4d826724 800 us-east-1a creating 2008-05-07T11:51:50+0000