KMS Customer Master Key Pending Deletion - Trend Micro

01 Run list-keys command (OSX/Linux/UNIX) to list all Customer Master Keys available in the selected AWS region:

aws kms list-keys --region us-east-1

02 The command output should return the ARN (Amazon Resource Name) and the ID for each CMK created in your current AWS region:

{ "Keys": [ { "KeyArn": "arn:aws:kms:us-east-1:123456789012: key/0a865351-7c39-4ef1-a4a3-03280af8ee05", "KeyId": "0a865351-7c39-4ef1-a4a3-03280af8ee05" }, { "KeyArn": "arn:aws:kms:us-east-1:123456789012: key/265bb9c7-ccfc-4cf1-9686-54866f31d647", "KeyId": "265bb9c7-ccfc-4cf1-9686-54866f31d647" } ] }

03 Run describe-key command (OSX/Linux/UNIX) using each CMK ID in order to identify any keys scheduled for deletion available in the current AWS region:

aws kms describe-key --key-id 0a865351-7c39-4ef1-a4a3-03280af8ee05

04 The command output should expose the selected CMK metadata. If the KeyState parameter value is set to PendingDeletion, the key is scheduled for deletion:

{ "KeyMetadata": { "KeyId": "0a865351-7c39-4ef1-a4a3-03280af8ee05", "Description": "", "DeletionDate": 1461196800.0, "Enabled": false, "KeyUsage": "ENCRYPT_DECRYPT", "KeyState": "PendingDeletion", "CreationDate": 1460543921.053, "Arn": "arn:aws:kms:us-east-1:123456789012: key/0a865351-7c39-4ef1-a4a3-03280af8ee05", "AWSAccountId": "123456789012" } }

05 Run cancel-key-deletion command (OSX/Linux/UNIX) to cancel the delete action for the selected Customer Master Key (CMK):

aws kms cancel-key-deletion --key-id 0a865351-7c39-4ef1-a4a3-03280af8ee05

06 Run again describe-key command (OSX/Linux/UNIX) to expose the CMK current status. If the operation was successful, the CMK KeyState parameter value moves from 'PendingDeletion' to 'Disabled':

{ "KeyMetadata": { "KeyId": "0a865351-7c39-4ef1-a4a3-03280af8ee05", "Description": "", "DeletionDate": 1461196800.0, "Enabled": false, "KeyUsage": "ENCRYPT_DECRYPT", "KeyState": "Disabled", "CreationDate": 1460543921.053, "Arn": "arn:aws:kms:us-east-1:123456789012: key/0a865351-7c39-4ef1-a4a3-03280af8ee05", "AWSAccountId": "123456789012" } }

Từ khóa » Cmk 647