More Info:
AWS CMK configuration changes should be monitored using CloudWatch alarms.Risk Level
MediumAddress
SecurityCompliance Standards
HIPAA, ISO27001, CISAWS, CBP, NISTCSFTriage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the CMK Disabled or Scheduled for Deletion alarm in AWS using the AWS console, you can follow the below steps:
- Login to your AWS account and navigate to the AWS KMS console.
- Click on the “Customer managed keys” option from the left-hand side menu.
- Identify the key that is disabled or scheduled for deletion.
- To enable a disabled key, select the key and click on the “Enable” button from the top menu.
- To cancel the scheduled deletion of a key, select the key and click on the “Cancel key deletion” button from the top menu.
- After completing the above steps, verify that the key status has changed to “Enabled” or “Pending import” and the alarm should automatically clear.
- If the alarm does not clear, check the SNS topic that is associated with the alarm to ensure that it is configured correctly.
Using CLI
Using CLI
The CMK (Customer Master Key) Disabled or Scheduled for Deletion alarm indicates that a CMK in AWS has been disabled or scheduled for deletion. This misconfiguration can lead to data loss or unauthorized access to encrypted data. Here are the steps to remediate this issue using AWS CLI:Replace Replace Replace Replace
- Identify the CMK that has been disabled or scheduled for deletion. You can use the following command to list all the CMKs in your AWS account:
- Check the status of each CMK to identify the one that has been disabled or scheduled for deletion. You can use the following command to describe the key state of a CMK:
<key-id> with the ID of the CMK that you want to check.- Reactivate the disabled CMK or cancel the scheduled deletion of the CMK. You can use the following command to enable a disabled CMK:
<key-id> with the ID of the disabled CMK that you want to enable.- If the CMK has been scheduled for deletion, you can cancel the deletion using the following command:
<key-id> with the ID of the CMK that you want to cancel the deletion for.- Verify that the CMK is active and not scheduled for deletion. You can use the following command to describe the key state of the CMK again:
<key-id> with the ID of the CMK that you want to verify.Once you have completed these steps, the CMK Disabled or Scheduled for Deletion alarm should be resolved. It is recommended to regularly monitor your AWS account for this type of misconfiguration and take necessary actions to remediate it.Using Python
Using Python
To remediate the CMK Disabled or Scheduled for Deletion Alarm in AWS using Python, you can follow the below steps:
-
First, you need to check the status of the CMK using the
describe_keymethod of the AWS KMS client. This method returns the metadata for the specified customer master key (CMK). -
Check the
KeyStateattribute of the CMK metadata. If it is set toDisabledorPendingDeletion, then the CMK is disabled or scheduled for deletion. -
If the
KeyStateattribute is not set toDisabledorPendingDeletion, then the CMK is already enabled and not scheduled for deletion.

