Create an Amazon EBS volume - Amazon Elastic Compute Cloud

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. If you create an encrypted EBS volume, you can only attach it to supported instance types. For more information, see Supported instance types.

If you are creating a volume for a high-performance storage scenario, you should make sure to use a Provisioned IOPS SSD volume (io1 or io2) and attach it to an instance with enough bandwidth to support your application, such as an EBS-optimized instance. The same advice holds for Throughput Optimized HDD (st1) and Cold HDD (sc1) volumes. For more information, see Amazon EBS–optimized instances.

Note

If you create a volume for use with a Windows instance, and it's larger than 2048 GiB (or is a volume that's smaller than 2048 GiB but might be increased later), ensure that you configure the volume to use GPT partition tables. For more information, see Windows support for hard disks that are larger than 2 TB..

Empty EBS volumes receive their maximum performance the moment that they are available and do not require initialization (formerly known as pre-warming). However, storage blocks on volumes that were created from snapshots must be initialized (pulled down from Amazon S3 and written to the volume) before you can access the block. This preliminary action takes time and can cause a significant increase in the latency of an I/O operation the first time each block is accessed. Volume performance is achieved after all blocks have been downloaded and written to the volume. For most applications, amortizing this cost over the lifetime of the volume is acceptable. To avoid this initial performance hit in a production environment, you can force immediate initialization of the entire volume or enable fast snapshot restore. For more information, see Initialize Amazon EBS volumes.

Important

If you create an io2 volume with a size greater than 16 TiB or with IOPS greater than 64,000 in a Region where EBS Block Express is supported, the volume automatically runs on Block Express. io2 Block Express volumes can be attached to supported instances only. For more information, see io2 Block Express volumes.

Methods of creating a volume

Create an empty volume

Empty volumes receive their maximum performance the moment that they are available and do not require initialization.

You can create an empty EBS volume using one of the following methods.

Console

To create an empty EBS volume using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Volumes.

  3. Choose Create volume.

  4. For Volume type, choose the type of volume to create. For more information, see Amazon EBS volume types.

  5. For Size, enter the size of the volume, in GiB. For more information, see Constraints on the size and configuration of an EBS volume.

  6. (io1, io2, and gp3 only) For IOPS, enter the maximum number of input/output operations per second (IOPS) that the volume should provide.

  7. (gp3 only) For Throughput, enter the throughput that the volume should provide, in MiB/s.

  8. For Availability Zone, choose the Availability Zone in which to create the volume. A volume can be attached only to an instance that is in the same Availability Zone.

  9. For Snapshot ID, keep the default value (Don't create volume from a snapshot).

  10. Set the encryption status for the volume.

    If your account is enabled for encryption by default, then encryption is automatically enabled and you can't disable it. You can choose the KMS key to use to encrypt the volume.

    If your account is not enabled for encryption by default, encryption is optional. To encrypt the volume, for Encryption, choose Encrypt this volume and then select the KMS key to use to encrypt the volume.

    Note

    Encrypted volumes can be attached only to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption.

  11. (Optional) To assign custom tags to the volume, in the Tags section, choose Add tag, and then enter a tag key and value pair. For more information, see Tag your Amazon EC2 resources.

  12. Choose Create volume.

    Note

    The volume is ready for use when the Volume state is available.

  13. To use the volume, attach it to an instance. For more information, see Attach an Amazon EBS volume to an instance.

AWS CLI

To create an empty EBS volume using the command line

You can use one of the following commands. For more information about these command line interfaces, see Access Amazon EC2.

The volume is ready for use when the state is available.

Create a volume from a snapshot

Volumes created from snapshots load lazily in the background. This means that there is no need to wait for all of the data to transfer from Amazon S3 to your EBS volume before the instance can start accessing an attached volume and all its data. If your instance accesses data that hasn't yet been loaded, the volume immediately downloads the requested data from Amazon S3, and then continues loading the rest of the volume data in the background. Volume performance is achieved after all blocks are downloaded and written to the volume. To avoid the initial performance hit in a production environment, see Initialize Amazon EBS volumes.

New EBS volumes that are created from encrypted snapshots are automatically encrypted. You can also encrypt a volume on-the-fly while restoring it from an unencrypted snapshot. Encrypted volumes can only be attached to instance types that support EBS encryption. For more information, see Supported instance types.

You can create a volume from a snapshot using one of the following methods.

Console

To create an empty EBS volume using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Volumes.

  3. Choose Create volume.

  4. For Volume type, choose the type of volume to create. For more information, see Amazon EBS volume types.

  5. For Size, enter the size of the volume, in GiB. For more information, see Constraints on the size and configuration of an EBS volume.

  6. (io1, io2, and gp3 only) For IOPS, enter the maximum number of input/output operations per second (IOPS) that the volume should provide.

  7. (gp3 only) For Throughput, enter the throughput that the volume should provide, in MiB/s.

  8. For Availability Zone, choose the Availability Zone in which to create the volume. A volume can be attached only to instances that are in the same Availability Zone.

  9. For Snapshot ID, select the snapshot from which to create the volume.

  10. Set the encryption status for the volume.

    If the selected snapshot is encrypted, or if your account is enabled for encryption by default, then encryption is automatically enabled and you can't disable it. You can choose the KMS key to use to encrypt the volume.

    If the selected snapshot is unencrypted and your account is not enabled for encryption by default, encryption is optional. To encrypt the volume, for Encryption, choose Encrypt this volume and then select the KMS key to use to encrypt the volume.

    Note

    Encrypted volumes can be attached only to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption.

  11. (Optional) To assign custom tags to the volume, in the Tags section, choose Add tag, and then enter a tag key and value pair. For more information, see Tag your Amazon EC2 resources.

  12. Choose Create Volume.

    Note

    The volume is ready for use when the Volume state is available.

  13. To use the volume, attach it to an instance. For more information, see Attach an Amazon EBS volume to an instance.

AWS CLI

To create an EBS volume from a snapshot using the command line

You can use one of the following commands. For more information about these command line interfaces, see Access Amazon EC2.

The volume is ready for use when the state is available.