Issue
I get the following error when I try to delete an ALB:
You cannot delete 'arn:aws:elasticloadbalancing:XXXXX' 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.
Then when I try to delete the listeners, I get this error:
Listener port '22' is in use by registered target 'arn:XXXX' and cannot be removed.
Hope you guys could teach me so I can delete this ALB. Thank you
Solution
Try the instructions here: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-delete.html
These are the steps to delete an Application Load Balancer:
- If you have a CNAME record for your domain that points to your load balancer, point it to a new location and wait for the DNS change to take effect before deleting your load balancer.
- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
- On the navigation pane, under LOAD BALANCING, choose Load Balancers.
- Select the load balancer, and then choose Actions, Delete.
- When prompted for confirmation, choose Yes, Delete.
Good Luck!
Answered By - Ray Garcia Answer Checked By - Marie Seifert (WPSolving Admin)