Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
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.
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.
If you intend to use a volume with an instance running on an outpost, then you must create
the volume on the same outpost as the instance. You can't use a volume created in an Amazon Region
with an instance on an Amazon outpost, or the other way around.
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
Open the Amazon EC2 console at
https://console.amazonaws.cn/ec2/.
-
In the navigation pane, choose Volumes.
-
Choose Create volume.
-
(Amazon Outpost customers only) For Outpost ARN, enter the
ARN of the Amazon outpost on which to create the volume.
If you intend to use a volume with an instance running on an outpost, then you must create
the volume on the same outpost as the instance. You can't use a volume created in an Amazon Region
with an instance on an Amazon outpost, or the other way around.
-
For Volume type, choose the type of volume to create. For more
information, see Amazon EBS volume types.
General Purpose SSD gp3
is the default selection.
-
For Size, enter the size of the volume, in GiB. For
more information, see Constraints on the size and configuration of an EBS
volume.
-
(io1
, io2
, and gp3
only) For IOPS, enter the maximum number
of input/output operations per second (IOPS) that the volume should provide.
-
(gp3
only) For Throughput, enter the throughput that the volume
should provide, in MiB/s.
-
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.
-
For Snapshot ID, keep the default value (Don't create
volume from a snapshot).
-
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.
Encrypted volumes can be attached only to instances that support Amazon EBS encryption. For
more information, see Amazon EBS encryption.
-
(Optional) To assign custom tags to the volume, in the Tags
section, choose Add tag, and then enter a tag key and value pair. .
-
Choose Create volume.
The volume is ready for use when the Volume state is available.
-
To use the volume, attach it to an instance. For more information, see
Attach an Amazon EBS volume to an instance.
- Amazon CLI
-
To create an empty EBS volume using the Amazon CLI
Use the create-volume command.
The volume is ready for use when the state
is available
.
- Tools for Windows PowerShell
-
To create an empty EBS volume using the Tools for Windows PowerShell
Use the New-EC2Volume command.
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 EBS volume from a snapshot using the console
Open the Amazon EC2 console at
https://console.amazonaws.cn/ec2/.
-
In the navigation pane, choose Volumes.
-
Choose Create volume.
-
For Volume type, choose the type of volume to create. For more
information, see Amazon EBS volume types.
General Purpose SSD gp3
is the default selection.
-
For Size, enter the size of the volume, in GiB. For
more information, see Constraints on the size and configuration of an EBS
volume.
-
(io1
, io2
, and gp3
only) For IOPS, enter the maximum number
of input/output operations per second (IOPS) that the volume should provide.
-
(gp3
only) For Throughput, enter the throughput that the volume
should provide, in MiB/s.
-
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.
-
For Snapshot ID, select the snapshot from which to create
the volume.
-
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.
Encrypted volumes can be attached only to instances that support Amazon EBS encryption. For
more information, see Amazon EBS encryption.
-
(Optional) To assign custom tags to the volume, in the Tags
section, choose Add tag, and then enter a tag key and value pair. .
-
Choose Create Volume.
The volume is ready for use when the Volume state is available.
-
To use the volume, attach it to an instance. For more information, see
Attach an Amazon EBS volume to an instance.
- Amazon CLI
-
To create an EBS volume from a snapshot using the Amazon CLI
Use the create-volume command.
The volume is ready for use when the state
is available
.
- Tools for Windows PowerShell
-
To create an EBS volume from a snapshot using the Tools for Windows PowerShell
Use the New-EC2Volume command.
The volume is ready for use when the state
is available
.