If you use customer master keys (CMKs) in a default Key Management Service (KMS) instance and the key quota and QPS cannot meet your business requirements, you can purchase a KMS instance of the hardware key management or software key management type and migrate the CMKs to the purchased instance. This topic describes how to migrate CMKs.
Usage notes
You need to migrate only CMKs in default KMS instances. You do not need to migrate service keys in default KMS instances or CMKs in dedicated KMS instances. For more information about keys in KMS consoles of different versions, see Keys in the KMS consoles of the new version and the old version.
After a CMK is migrated, data that is encrypted by using the CMK can still be decrypted by using the CMK.
If you do not migrate CMKs in default KMS instances, you can use the CMKs in the KMS console of the old version, but you cannot increase the key quota.
You cannot migrate the following CMKs:
CMKs with external key material
CMKs with automatic rotation enabled
ImportantIf automatic rotation is enabled for a CMK with only one version, you can migrate the CMK after you disable automatic rotation.
CMKs with multiple versions
If your applications are deployed on Alibaba Cloud, you can follow the instructions provided in this topic to migrate CMKs. If your applications are deployed outside Alibaba Cloud, you can contact technical support by using ticket.
Before you migrate CMKs, we recommend that you understand the capabilities of KMS instances of the hardware key management type or the software key management type. For more information, see Instance selection.
Migration scenarios
Scenario 1: A CMK with KMS-generated key material is used for server-side encryption in Alibaba Cloud services
Check whether the CMK can be migrated.
Log on to the KMS console of the old version.
In the left-side navigation pane, click Keys. In the upper part of the page, click Migration Diagnostic Tool.
Read the prompt and click OK. Then, the tool displays whether the CMK can be migrated.
Purchase a KMS instance of the hardware key management or software key management type.
For more information, see Purchase a KMS instance. For more information about how to select a KMS instance, see Instance selection.
Contact technical support to migrate the CMK.
Contact technical support by using ticket. You need to provide the following information: the ID of the CMK that you want to migrate, the migration time window, and the destination KMS instance to which you want to migrate the CMK. We recommend that you migrate the CMK during off-peak hours.
NoteAlibaba Cloud performs CMK migration during the migration time window. After the migration is complete, you can view the CMK in the KMS console of the new version. To view the CMK, log on to the KMS console of the new version. On the Keys page, select the KMS instance to be migrated and view the CMK in the key list.
Scenario 2: A CMK with KMS-generated key material is used for data encryption in user-owned applications
Check whether the CMK can be migrated.
Log on to the KMS console of the old version.
In the left-side navigation pane, click Keys. In the upper part of the page, click Migration Diagnostic Tool.
Read the prompt and click OK. Then, the tool displays whether the CMK can be migrated.
Check whether the CMK can be migrated.
Condition
Description
Cryptographic operations
If an application uses ReEncrypt, ExportDataKey, or GenerateAndExportDataKey API operations, the CMK cannot be migrated.
Network location of an application
If an application and the KMS instance that encrypts the data in the application reside in the same or different virtual private clouds (VPCs), the CMK can be migrated.
Application development programming languages
Migration SDK for Java, Migration SDK for Go, and Migration SDK for Python are provided to help you migrate the CMK with fewer code modifications. If an application is developed in other programming languages, you cannot migrate the CMK. To submit your CMK migration requirements, you can contact technical support by using ticket.
Purchase a KMS instance of the hardware key management or software key management type.
For more information, see Purchase a KMS instance. For more information about how to select a KMS instance, see Instance selection.
Contact technical support to migrate the CMK.
Contact technical support by using ticket. You need to provide the following information: the ID of the CMK that you want to migrate, the migration time window, and the destination KMS instance to which you want to migrate the CMK. We recommend that you migrate the CMK during off-peak hours.
NoteAlibaba Cloud performs CMK migration during the migration time window. After the migration is complete, you can view the CMK in the KMS console of the new version. To view the CMK, log on to the KMS console of the new version. On the Keys page, select the KMS instance to be migrated and view the CMK in the key list.
Modify the application.
ImportantAlibaba Cloud closes the entry point to the KMS console of the old version one month after you migrate the CMK in the default KMS instances. You must modify the application within one month after you migrate the CMK.
Creates an application access point (AAP). For more information, see Access a KMS instance by using an AAP.
Modify the code of the application. The following examples show how to modify the code of an application in different programming languages:
Scenario 3: A CMK with external key material is used for server-side encryption in Alibaba Cloud services
You cannot migrate CMKs with external key material.
Scenario 4: A CMK with external key material is used for data encryption in user-owned applications
You cannot migrate CMKs with external key material.
Keys in the consoles of the old version and the new version
Service keys
In the KMS console of the old version
In the left-side navigation pane, click Keys. In the top navigation bar, select a region. Find a key. If the value in the KMS Instance column is Default and the key alias is in the
alias/acs/Cloud service
format, the key is a service key.In the KMS console of the new version
In the left-side navigation pane, click Instances. In the top navigation bar, select a region. On the Instances page, click the Default Key Management tab. Find a key. If the value in the KeyManagerType column is Service Key, the key is a service key.
CMKs in default KMS instances
In the KMS console of the old version
In the left-side navigation pane, click Keys. In the top navigation bar, select a region. Find a key. If the value in the KMS Instance column is Default and the key alias is not in the
alias/acs/Cloud service
format, the key is a CMK.In the KMS console of the new version
In the left-side navigation pane, click Instances. In the top navigation bar, select a region. On the Instances page, click the Default Key Management tab. Find a key. If the value in the KeyManagerType column is CMK, the key is a CMK.
ImportantIn the KMS console of the new version, you can only view CMKs that are used as default keys, but cannot manage the CMKs. For example, you cannot disable a CMK or schedule the deletion of a CMK. If you want to manage the CMKs, go to the KMS console of the old version.
CMKs in dedicated KMS instances
In the KMS console of the old version
In the left-side navigation pane, click Keys. In the top navigation bar, select a region. Find a key. If the value in the KMS Instance column is the ID of a dedicated KMS instance, the key is a CMK.
In the KMS console of the new version
In the left-side navigation pane, click Keys. In the top navigation bar, select a region and select the ID of a KMS instance from the Instance ID drop-down list. All keys in the KMS instance are displayed on the page.
Additional information
The resources that are displayed in the KMS console of the old version are used as an example to describe whether the resources can be migrated.

KMS console of the old version | Description | Migration |
Dedicated KMS | If you purchased a dedicated KMS instance, the details of the instance include the information about keys and secrets of the KMS instance. In the KMS console of the new version, an instance of the software key management type is equivalent to the dedicated KMS instance of the Basic edition, and an instance of the hardware key management type is equivalent to the dedicated KMS instance of the Standard edition. | Migration is not required. Go to the KMS console of the new version. On the Instances page, you can view instances on the Software Key Management tab and the Hardware Key Management tab. |
Keys | The following types of keys are displayed on the Keys page:
|
|
Secrets | The secrets feature on the Secrets page is in the public preview. You still can use and manage the secrets in the KMS console of the old version. Note The Secrets page does not contain the secrets in dedicated KMS instances. | You cannot migrate secrets. To migrate the secrets, you can contact technical support by using ticket. To use more comprehensive secret capabilities, we recommend that you purchase a KMS instance of the hardware key management or software key management type. Then, you can create and use a secret in the instance. |
Certificate | After July 11, 2023, you cannot create certificates. You can still use and manage existing certificates in the KMS console of the old version. The KMS console of the new version does not allow you to create certificates. | Migration is not supported. |
Private CA | After July 11, 2023, you cannot purchase private certificate authority (CA) certificates on the Private CA page of the KMS console. The KMS console of the new version does not allow you to purchase CA certificates. | Migration is not supported. |
Applications | The AAPs on the Applications page are used to access dedicated KMS instances. | Migration is not required. Go to the KMS console of the new version and view the AAPs on the Applications page. |