| Did this page help you? Yes No Tell us about it... |
Creates a new Amazon EBS volume that any Amazon EC2 instance in the same Availability Zone can attach to. Any AWS Marketplace product codes from the snapshot are propagated to the volume. For more information about Amazon EBS, go to the Amazon Elastic BLock Store.
![]() | 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. |
The short version of this command is ec2addvol.
ec2-create-volume [ --size
size | --snapshot
snapshot [--size size] ] --availability-zone
zone
| Name | Description | Required |
|---|---|---|
|
|
The size of the volume, in GiBs. Type: String Valid Values: Condition: Required if you are not creating a volume from a snapshot. Default: If you're creating a volume from a snapshot and don't specify a size, the default is the snapshot size. Example: -s 80 |
Conditional |
|
|
The snapshot from which to create the new volume. Type: String Default: None Condition: Required if you are creating a volume from a snapshot. Example: --snapshot snap-78a54011 |
Conditional |
|
|
The Availability Zone in which to create the new volume. Type: String Default: None Example: -z us-east-1a |
Yes |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
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 command line tools display errors on stderr.
This example creates a new 20 GiB volume in Availability Zone us-east-1a.
PROMPT>ec2-create-volume --size 20 --availability-zone us-east-1aVOLUME vol-4d826724 20 us-east-1a creating 2008-05-07T11:51:50+0000