Delete CloudWatch Alarms in Insufficient State
Last updated
Identifies and deletes CloudWatch Alarms that are in the INSUFFICIENT_DATA state. These alarms often indicate that metrics are no longer being reported or monitored.
Risk Level
Low
AWS Service Targeted
Amazon CloudWatch
Read Permissions
cloudwatch:DescribeAlarms
Delete Permissions
cloudwatch:DeleteAlarms
These permissions are granted only to the runbook, not to the OneLens platform itself.
This runbook remediates violation tickets triggered by the following policy:
cw_101
Ensure no CloudWatch Alarms are in insufficient state
The change is assessed as low risk with limited scope and impact.
No downtime is expected during or after implementation.
No additional safety measures are required due to the non-disruptive nature of the change.
A rollback plan is not defined, as standard procedures are sufficient to manage the change.
Refer to the Runbook Setup Guide for steps to install and enable this runbook in your environment.
Trigger: Initiates the Runbook execution for deleting unused CloudWatch alarms.
Action: Executes the DescribeAlarms API call to retrieve the list of alarms and their current states.
Condition: Evaluates whether any alarms meet the criteria for further action based on their state.
IsValidForDelete Validates if the filtered alarms meet criteria for deletion.
DeleteAlarms
Executes the DeleteAlarms API call on the validated alarms.
RunScript If no other eligible resource is found, raises a runtime error, failing the workflow explicitly.
Else (no alarms in that state or invalid structure):
Exit through the Else path — no further action taken.

To run this workflow:
Identify the ticket associated with the above mentioned policy violation.
Follow the steps described in the executing a runbook section to apply this runbook to the ticket.
Last updated

