Delete idle Classic/Application Load Balancers

What It Does

Deletes idle Elastic Load Balancers (ELBs), including Classic that are not actively handling traffic. Unused load balancers may incur hourly charges and contribute to unnecessary cloud cost. Deleting them improves infrastructure hygiene and optimizes spend.

Risk and Scope

Detail
Value

Risk Level

Low

AWS Service Targeted

Elastic Load Balancing

Permissions Required

Optimization Policies Addressed

This runbook remediates violation tickets of the following policy:

Policy ID
Policy Name

elb_1

Application Load Balancers should not have zero requests for extended periods

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

Step 1: Start

Trigger: Begins the runbook to identify and delete idle Classic, Application, Network, or Gateway load balancers.

Step 2: CheckIfLBIsIdleAndClassic

Action: Executes a script to determine whether each load balancer is idle and whether it is of Classic or newer type (v2).

Step 3: If/Else

Condition: Checks if the load balancer meets the deletion criteria.

  1. If eligible LB is idle:

    1. DeleteLoadBalancer Executes DeleteLoadBalancer for ELBv2 load balancers.

    2. DeleteLoadBalancer_Classic Executes DeleteLoadBalancer for Classic load balancers.

  2. Else:

    Workflow ends if no deletable load balancer is found.

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