Delete CloudWatch Alarms in Insufficient State

What It Does

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 and Scope

Detail
Value

Risk Level

Low

AWS Service Targeted

Amazon CloudWatch

Permissions Required

Optimization Policies Addressed

This runbook remediates violation tickets triggered by the following policy:

Policy ID
Policy Name

cw_101

Ensure no CloudWatch Alarms are in insufficient state

Risk Mitigation

Risk Mitigation Strategy

How to Install

Refer to the Runbook Setup Guide for steps to install and enable this runbook in your environment.

Runbook Workflow

1. Start

Trigger: Initiates the Runbook execution for deleting unused CloudWatch alarms.

2. DescribeAlarms

Action: Executes the DescribeAlarms API call to retrieve the list of alarms and their current states.

3. If/Else

Condition: Evaluates whether any alarms meet the criteria for further action based on their state.

  1. IsValidForDelete Validates if the filtered alarms meet criteria for deletion.

    1. DeleteAlarms Executes the DeleteAlarms API call on the validated alarms.

    2. RunScript If no other eligible resource is found, raises a runtime error, failing the workflow explicitly.

  2. Else (no alarms in that state or invalid structure):

    Exit through the Else path — no further action taken.

See How it Works

Triggering the Runbook

To run this workflow:

1. Locate the Ticket

Identify the ticket associated with the above mentioned policy violation.

2. Execute the Runbook

Follow the steps described in the executing a runbook section to apply this runbook to the ticket.

Last updated