How do I resolve the errors that I get when I delete the Application Load Balancer?

2 minute read

I want to troubleshoot the errors that I get when I delete the Application Load Balancer.


Important: As a best practice, before you delete a resource, make sure that your load balancers aren't actively handling traffic within your organization. This prevents accidental deletion or disruption.

When you delete an Application Load Balancer, you might get one of the following error messages:

Failed to delete load balancer

Error: "Failed to delete load balancer: You cannot delete 'arn:aws:elasticloadbalancing:ap-southeast-2:12345678910:loadbalancer/app/myALB/123456789101112' since it is registered as a target of one or more target groups. To delete this target, you must first deregister it from all target groups."

This error commonly occurs when your Application Load Balancer is, or has been, the target of a Network Load Balancer. You might get this error even after you delete the Network Load Balancer that you set up to send traffic to your Application Load Balancer.

Make sure that your Application Load Balancer isn't associated to a target group of the target type: Application Load Balancer. To resolve this error, follow these steps:

  1. Log in to your Amazon Elastic Compute Cloud (Amazon EC2) console:
  2. On the left navigation pane, choose Target Groups.
  3. In the search bar, choose the Target Type filter. Set the filter to equal (=) for the Application Load Balancer.

Delete the Application Load Balancer

Use one of the following options to delete the Application Load Balancer:

Deregister the Application Load Balancer. From the target group under the Targets menu tab, select Deregister. Then, delete the Application Load Balancer.


Delete the target group. To delete, select the target group, and then choose Actions. Choose Delete, and then delete the Application Load Balancer.

Failed to delete due to Deletion Protection

Error: "Failed to delete load balancer: Load balancer 'arn:aws:elasticloadbalancing:ap-southeast-2:12345678910:loadbalancer/app/alb/123456789101112' cannot be deleted because deletion protection is enabled."

You can't delete a load balancer when deletion protection is activated.

To deactivate deletion protection, do the following:

  1. Open the Amazon EC2 console.
  2. On the navigation pane, choose Load Balancers.
  3. Select the load balancer.
  4. On the Attributes tab, choose Edit.
  5. Under Configuration, turn off Deletion protection.
  6. Choose Save changes.

Note: After you deactivate deletion protection, delete the Application Load Balancer.

AWS OFFICIALUpdated 2 months ago