---
title: "Ensure unused Elastic Load Balancers are deleted"
canonical: "https://kb.cynergy.app/space/MD/991789516/Ensure%20unused%20Elastic%20Load%20Balancers%20are%20deleted"
format: markdown
---
Cynergy Policy ID: CYN_AWS_GENERAL_21  
Severity: LOW

# Unused Elastic Load Balancers are present

# Description

Amazon Elastic Load Balancers that are actively configured in your AWS account are adding charges to your monthly bill. If an ELB has no associated back-end instances, it is recommended to register instances or delete it.

# Fix - Runtime

## AWS Console

1. Go to the Amazon <u>[EC2 console](https://console.aws.amazon.com/ec2/)</u>.
2. On the navigation pane, under LOAD BALANCING, choose Load Balancers.
3. Select the load balancer, and then choose Actions, Delete.
4. When prompted for confirmation, choose Yes, Delete.
5. To delete a load balancer using the AWS CLI

# Fix - Build time

## Terraform

**Resource**: aws_elb, aws_lb

Go

```go
- resource "aws_elb" "bar" {
-  name               = "foobar-terraform-elb"
-  availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"]

-  access_logs {
  -  bucket        = "foo"
  -  bucket_prefix = "bar"
  -  interval      = 60
  }

-  listener {
  -  instance_port     = 8000
  -  instance_protocol = "http"
  -  lb_port           = 80
  -  lb_protocol       = "http"
  }

```