This topic describes how to encrypt a data disk. After a data disk is encrypted, both data in transit and data at rest on the disk are encrypted. You can follow the instructions described in this topic to encrypt data disks to meet security and compliance requirements.
Background information
You can use one of the following methods to encrypt data disks:
- Create an Elastic Compute Service (ECS) instance from an encrypted custom image that contains data of data disks. The data disks of the instance are encrypted. For more information, see Create an ECS instance by using a custom image.
- When you create an instance, click Add Disk to add data disks and select Disk Encryption and a key for each data disk. For more information, see the Encrypt a data disk when you create an ECS instance section in this topic.
- When you create an independent disk, select Disk Encryption and a key for the disk. For more information, see the Encrypt a data disk when you create the disk section in this topic.
When you encrypt data disks, you must use keys in Key Management Service (KMS). For more information, see Encryption overview.
Requirements
If you select Create from Snapshot to create a data disk, you can select Disk Encryption to encrypt the disk only when the following requirements described in the following table are met.
Item | Requirement |
---|---|
Instance family | The instance family of the associated instance is not ecs.ebmg5, ecs.ebmgn5t, ecs.ebmi3, ecs.sccg5, ecs.scch5, ecs.ebmc4, or ecs.ebmhfg5. For more information, see Overview of instance families. |
Image | The associated instance uses a public or custom image, instead of a shared image or an Alibaba Cloud Marketplace image. |
Disk category | The disk is an enhanced SSD (ESSD). |
Encrypt a data disk when you create an ECS instance
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- On the Instances page, click Create Instance.
- In the Basic Configurations step, find the Storage section and perform the following steps:
Encrypt a data disk when you create the disk
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- On the Disks page, click Create Disk.
- In the Storage section, specify the category and capacity of the disk. Note This step describes only how to configure the encryption settings when you create a disk. For information about other configurations of the disk, see Create a disk.
- Select Disk Encryption and select a key from the drop-down list. By default, Alibaba Cloud uses the Default Service CMK as the encryption key when you select Disk Encryption for a disk. You can also specify a CMK that you created in KMS as the encryption key of the disk. We recommend that you use a custom CMK as the encryption key. For information about how to create a CMK, see Create a CMK.Note Currently, custom CMKs cannot be selected as encryption keys in the China (Nanjing - Local Region), China (Fuzhou-Local Region), Thailand (Bangkok), or South Korea (Seoul) region.After the disk is encrypted, a tag is automatically added to the KMS key that is used to encrypt the disk. The key of the tag is
acs:ecs:disk-encryption
, and the value of the tag istrue
. You can log on to the KMS console and click the ID of the KMS key to view its tag.