Create an Amazon EBS volume
You can create an Amazon EBS volume and then attach it to any EC2 instance in the same Availability Zone.
You can either create an empty volume, or you can create a volume from an Amazon EBS snapshot. If you create a volume from a snapshot, the volume begins as an exact replica of the volume that was used to create that snapshot.
Volume initialization
When you create a volume from a snapshot, the storage blocks from the snapshot must be downloaded from Amazon S3 and written to the volume before you can access them. This process is called volume initialization. During this time, the volume will experience increased I/O latency. Full volume performance is achieved once all storage blocks have been downloaded and written to the volume. You can minimize the performance impacts of volume initialization by doing one of the following:
-
Use a snapshot that is enabled for fast snapshot restore. In this case, the volume is fully initialized at creation and it immediately delivers maximum performance. For more information, see Amazon EBS fast snapshot restore.
-
Manually initialize the volume after creation. For more information, see Initialize Amazon EBS volumes
Empty volumes deliver their maximum performance immediately after creation and do not require initialization.
Volume encryption
The encryption state of the volume depends on whether your account is enabled for encryption by default, and on the encryption state of the snapshot, if you choose to use one. The following table summarizes the possible encryption outcomes.
Encryption by default | Snapshot used? | Volume encryption outcome | Note |
---|---|---|---|
Disabled | No | Optional encryption | If you enable encryption, you can specify the KMS key to use. If you enable encryption
but do not specify a KMS key, the AWS managed key (aws/ebs ) is used. |
Disabled | Yes, unencrypted | Optional encryption | If you enable encryption, you can specify the KMS key to use. If you enable encryption
but do not specify a KMS key, the AWS managed key (aws/ebs ) is used. |
Disabled | Yes, encrypted | Automatic encryption | You can specify the KMS key to use. If you do not specify a KMS key, the volume is encrypted using the same KMS key as the source snapshot. |
Enabled | No | Automatic encryption | You can specify the KMS key to use. If you do not specify a KMS key, the key specified for encryption by default is used. |
Enabled | Yes, unencrypted | Automatic encryption | You can specify the KMS key to use. If you do not specify a KMS key, the key specified for encryption by default is used. |
Enabled | Yes, encrypted | Automatic encryption | You can specify the KMS key to use. If you do not specify a KMS key, the volume is encrypted using the same key as the source snapshot (console), or the key specified for encryption by default (CLI/API). |
Additional considerations
-
Volumes can be attached to instances in the same Availability Zone only.
-
Volumes are ready for use only once they reach the
available
state. -
When you create a volume using the console,
gp3
is the default volume type. For the command line tools, API, and SDK,gp2
is the default volume type. -
To use a volume with an instance running on an outpost, you must create the volume on the same outpost as the instance.
-
If you create a volume for use with a Windows instance, and it's larger than 2048 GiB, ensure that you configure the volume to use GPT partition tables. For more information, see Amazon EBS volume constraints and Windows support for disks larger than 2 TB.
. -
Volumes are also created indirectly by launching an Amazon EC2 instance. Either the AMI used to launch the instance, or the instance launch request itself could include block device mappings for Amazon EBS volumes. For more information, see Block device mappings.
Use one of the following methods to create a volume.