ec2-create-volume
Syntax
ec2-create-volume [--size
size
| --snapshot snapshot
] --availability-zone zone
Description
Creates an Amazon EBS volume of a size you specify or from a snapshot.
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. |
Options
Option | Description | Required |
---|---|---|
--size | The size of the Amazon EBS volume, in GiB. Required if you are not creating a volume from a snapshot. Example: 800 | Conditional |
--snapshot | The snapshot from which to create the new volume. Required if you do not specify a volume size. Example: | Conditional |
--availability-zone | The availability zone in which to create the new volume. Example: | Yes |
Output
Amazon EBS 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
)Time stamp when volume creation was initiated
Amazon EBS displays errors on stderr
.
Example
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-02-14T00:00:00+0000