All Products
Search
Document Center

ApsaraDB RDS:Disk encryption

Last Updated:Mar 28, 2026

Disk encryption protects all data on your RDS for SQL Server data disk using block storage-level encryption. It is free, requires no application changes, and can be enabled when you create an instance or on an existing instance.

Supported configurations

Not all instance types support disk encryption in the same way. The table below shows what each type supports.

Instance typeEnable on new instanceEnable on existing instanceSupported key types
DedicatedYesYesService key or custom key
General-purposeYesYesService key or custom key
SharedYesNoService key (Default Service CMK) only
Read-onlyNo (inherits from primary)No
ServerlessNoNo

Additional constraints:

  • Storage type must be ESSD.

  • If the primary instance has read-only instances attached, release them before enabling disk encryption. After encryption is enabled, new read-only instances inherit it automatically.

  • Disk encryption cannot be disabled once enabled.

  • After enabling disk encryption, you cannot update the minor engine version.

Billing

Disk encryption is free, including all read and write operations on encrypted disks.

Keys are managed by Key Management Service (KMS):

Key typeCost
Default Service CMK and master keysFree
Software-protected keys and hardware-protected keysBilled by KMS

Key management

Transient disconnection

Enabling disk encryption on an existing instance or changing the encryption key causes a brief outage:

EditionDowntime
High-availability Edition / Cluster Edition~30 seconds
Basic Edition~5 minutes

Schedule these operations during off-peak hours and make sure your application has an automatic reconnection mechanism.

Key availability

The availability of your instance depends on continuous access to its encryption key. Two situations can make the instance inaccessible:

  • Overdue KMS payments: If you use a paid key type (software-protected or hardware-protected), an overdue payment prevents the disk from being decrypted, making the entire instance unavailable. Keep your KMS account current.

  • Disabled or deleted key: Disabling or deleting a master key, software-protected key, or hardware-protected key immediately locks the RDS instance. All operations and maintenance (O&M) activities—backups, configuration changes, restarts, and high-availability (HA) switchovers—fail until the key is restored.

Default service key (Default Service CMK)

The RDS-managed service key uses the Aliyun_AES_256 specification. Key rotation is disabled by default. To enable key rotation, purchase the key rotation service from the KMS console.

Enable disk encryption for a new instance

  1. When you create an ApsaraDB RDS for SQL Server instance, set the storage type to ESSD.

  2. Select Cloud Disk Encryption, then select the target key.

Select Cloud Disk Encryption before you select the instance type. For shared instances, set the key to Default Service CMK—shared instances support service keys only. To create a custom key, see Create and enable a key.

Enable disk encryption for an existing instance

Important

This operation causes a transient disconnection. The instance is unavailable for ~30 seconds (High-availability Edition or Cluster Edition) or ~5 minutes (Basic Edition). Schedule this during off-peak hours and make sure your application reconnects automatically.

  1. Go to the Instances page. In the top navigation bar, select the region of your instance, then click the instance ID.

  2. In the left navigation pane, click Data Security.

  3. On the Data Encryption tab, click Enable Encryption.

  4. In the dialog box, select the desired key and click OK. The instance state changes to Configuration Changing.

  5. Encryption is active when the instance state returns to Running and the encryption details appear on the Data Encryption tab. image

View disk encryption status and key details

  1. Go to the Instances page. Select the region, then click the instance ID.

  2. On the Basic Information page, check the disk encryption key.

If no key appears, disk encryption is not enabled. To view all keys under your account, open the KMS console. On the Keys > Default Keys tab, a Key Usage value of Service Key means the key is managed by Alibaba Cloud.

Change the encryption key

Dedicated and general-purpose instances support key changes. Shared instances cannot change keys because they support service keys only.

Important

Changing the key causes a transient disconnection (~30 seconds for High-availability Edition or Cluster Edition; ~5 minutes for Basic Edition). Schedule this during off-peak hours.

  1. Go to the Instances page. Select the region, then click the instance ID.

  2. In the left navigation pane, click Data Security.

  3. On the Data Encryption tab, click Replace Key.

  4. In the Change Encryption Key of Data Disk dialog box, select the new key and click OK.

API reference

OperationAPI
Enable disk encryption when creating an instanceCreateDBInstance
Enable disk encryption for an existing instanceModifyDBInstanceConfig
Query disk encryption statusDescribeDBInstanceEncryptionKey