All Products
Search
Document Center

Key Management Service:Create a key

Last Updated:Mar 31, 2026

Use the Key Management Service (KMS) console to create a customer master key (CMK) for encrypting data or generating digital signatures.

Prerequisites

Before you begin, ensure that you have:

  • A KMS instance. The instance type determines which key specs are available

  • The permissions required to create CMKs in KMS

Key spec and purpose compatibility

Key Spec and Purpose are linked — not every key spec supports every purpose. Review this table before creating the CMK.

Key specTypeSupported purposeNotes
Aliyun_AES_256SymmetricEncrypt/DecryptSupports automatic rotation and external key material
Aliyun_SM4SymmetricEncrypt/DecryptChinese mainland regions with managed HSMs only; supports automatic rotation and external key material
RSA_2048AsymmetricEncrypt/Decrypt or Sign/Verify
RSA_3072AsymmetricEncrypt/Decrypt or Sign/VerifyDedicated KMS instance only
EC_P256AsymmetricSign/Verify
EC_P256KAsymmetricSign/Verify
EC_SM2AsymmetricSign/VerifyChinese mainland regions with managed HSMs only

Create a CMK

  1. Log on to the KMS console.

  2. In the top navigation bar, select the region where you want to create the CMK.

  3. In the left-side navigation pane, choose Resource > Keys.

  4. Click Create Key.

  5. In the Create Key dialog box, configure the following parameters:

    ParameterDescription
    KMS InstanceThe KMS instance to associate with this CMK.
    Key SpecThe cryptographic algorithm for the CMK. See the compatibility table above.
    PurposeThe operations this CMK supports. Encrypt/Decrypt for data encryption; Sign/Verify for digital signatures.
    Alias Name(Optional) A human-readable label to identify the CMK. For alias format requirements, see Overview.
    Protection LevelHow the CMK is protected. Software uses a software module; Hsm stores the CMK in a Hardware Security Module (HSM).
    Description(Optional) A description of the CMK.
    Rotation PeriodFor symmetric keys (Aliyun_AES_256 or Aliyun_SM4) only: the interval for automatic key rotation. Options: 30, 90, 180, or 365 days; a custom interval between 7 and 730 days; or Disable to turn off automatic rotation.
  6. For symmetric keys, click Advanced to configure Key Material Source:

    • Alibaba Cloud KMS: KMS generates the key material automatically.

    • External: Import key material from an external source. If you select this option, also select I understand the implications of using the external key materials key. For import instructions, see Import key material.

    The Advanced option is available only when Key Spec is set to Aliyun_AES_256 or Aliyun_SM4.
  7. Click OK.

The CMK is created. The key list now shows the new CMK's ID, status, and protection level.

What's next

  • Import key material — if you selected External as the key material source

  • Overview — learn more about aliases and how to manage CMKs