The Wayback Machine - https://web.archive.org/web/20201020235600/https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
Key state: Effect on your CMK - AWS Key Management Service

Key state: Effect on your CMK

Customer master keys (CMKs) are always in one of the following states: Enabled, Disabled, PendingImport, PendingDeletion, or Unavailable.

The following table shows whether AWS KMS API operations that run on a CMK in each state can be expected to succeed (✓), fail (X), or succeed only under certain conditions (?). The result often differs for CMKs with imported key material.

Symmetric CMKs can be in the Enabled, Disabled, PendingImport, PendingDeletion, or Unavailable states. Asymmetric CMKs can be in the Enabled, Disabled, or PendingDeletion key state.

The Unavailable state applies only to a CMK in a custom key store. A CMK in a custom key store is Unavailable when the custom key store is intentionally disconnected from its AWS CloudHSM cluster. You can view and manage unavailable CMKs, but you cannot use them in cryptographic operations.

The following API operations do not appear in the table because they do not use an existing CMK.

  • ConnectCustomKeyStore

  • CreateCustomKeyStore

  • CreateKey

  • DeleteCustomKeyStore

  • DescribeCustomKeyStores

  • DisconnectCustomKeyStore

  • GenerateRandom

  • UpdateCustomKeyStore

API Enabled Disabled Pending import Pending deletion Unavailable
CancelKeyDeletion Image

[4]

Image

[4]

Image

[4]

Image Image

[4], [13]

CreateAlias Image Image Image Image

[3]

Image
CreateGrant Image Image

[1]

Image

[5]

Image

[2] or [3]

Image
Decrypt Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

DeleteAlias Image Image Image Image Image
DeleteImportedKeyMaterial Image

[9]

Image

[9]

Image

(No effect)

Image

[9]

Image

[9]

DescribeKey Image Image Image Image Image
DisableKey Image Image Image

[5]

Image

[3]

Image

[12]

DisableKeyRotation Image

[7]

Image

[1] or [7]

Image

[6]

Image

[3] or [7]

Image

[7]

EnableKey Image Image Image

[5]

Image

[3]

Image

[12]

EnableKeyRotation Image

[7]

Image

[1] or [7]

Image

[6]

Image

[3] or [7]

Image

[7]

Encrypt Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

GenerateDataKey Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

GenerateDataKeyPair Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

GenerateDataKeyPairWithoutPlaintext Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

GenerateDataKeyWithoutPlaintext Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

GetKeyPolicy Image Image Image Image Image
GetKeyRotationStatus Image

[7]

Image

[7]

Image

[6]

Image

[7]

Image

[7]

GetParametersForImport Image

[9]

Image

[9]

Image Image

[8] or [9]

Image

[9]

GetPublicKey Image Image

[1]

N/A Image

[2] or [3]

N/A
ImportKeyMaterial Image

[9]

Image

[9]

Image Image

[8] or [9]

Image

[9]

ListAliases Image Image Image Image Image
ListGrants Image Image Image Image Image
ListKeyPolicies Image Image Image Image Image
ListKeys Image Image Image Image Image
ListResourceTags Image Image Image Image Image
ListRetirableGrants Image Image Image Image Image
PutKeyPolicy Image Image Image Image Image
ReEncrypt Image Image

[1]

Image

[5]

Image

[2] or [3]

Image

[11]

RetireGrant Image Image Image Image Image
RevokeGrant Image Image Image Image Image
ScheduleKeyDeletion Image Image Image Image

[3]

Image
Sign Image Image

[1]

N/A Image

[2] or [3]

N/A
TagResource Image Image Image Image

[3]

Image
UnTagResource Image Image Image Image

[3]

Image
UpdateAlias Image Image Image Image

[10]

Image
UpdateKeyDescription Image Image Image Image

[3]

Image
Verify Image Image

[1]

N/A Image

[2] or [3]

N/A

Table Details

  • [1] DisabledException: <CMK ARN> is disabled.

  • [2] DisabledException: <CMK ARN> is pending deletion.

  • [3] KMSInvalidStateException: <CMK ARN> is pending deletion.

  • [4] KMSInvalidStateException: <CMK ARN> is not pending deletion.

  • [5] KMSInvalidStateException: <CMK ARN> is pending import.

  • [6] UnsupportedOperationException: <CMK ARN> origin is EXTERNAL which is not valid for this operation.

  • [7] If the CMK has imported key material or is in a custom key store: UnsupportedOperationException.

  • [8] If the CMK has imported key material: KMSInvalidStateException

  • [9] If the CMK cannot or does not have imported key material: UnsupportedOperationException.

  • [10] If the source CMK is pending deletion, the command succeeds. If the destination CMK is pending deletion, the command fails with error: KMSInvalidStateException : <CMK ARN> is pending deletion.

  • [11] KMSInvalidStateException: <CMK ARN> is unavailable. You cannot perform this operation on an unavailable CMK.

  • [12] The operation succeeds, but the key state of the CMK does not change until it becomes available.

  • [13] While a CMK in a custom key store is pending deletion, its key state remains PendingDeletion even if the CMK becomes unavailable. This allows you to cancel deletion of the CMK at any time during the waiting period.