Skip to content

How do I delete a Network Load Balancer that's currently associated with another service?

2 minute read
2

I'm trying to delete my Network Load Balancer. However, I receive the error message, "Network Load Balancer is currently associated with another service."

Resolution

Disassociate the Network Load Balancer from Amazon VPC endpoint services

Before you can delete a Network Load Balancer, you must first disassociate it from any associated Amazon Virtual Private Cloud (Amazon VPC) endpoint services. To disassociate, complete the following steps:

  1. Open the Amazon VPC console.
  2. In the navigation pane, choose Endpoint services.
  3. Choose the Network Load Balancer tab to view the endpoint services that your Network Load Balancer is associated with.
  4. Choose the Endpoint connections tab to determine endpoint connections that are attached to your endpoint service.
  5. For the connections that aren't in the Rejected state, choose Actions, and then choose Reject endpoint connection request.

After you delete the associated endpoints, you can either delete the Network Load Balancer and keep the endpoint services active. Or, you can delete the Network Load Balancer and the associated endpoint services.

Delete the Network Load Balancer and keep the endpoint services active

If you chose to delete the Network Load Balancer and keep the endpoint services active, then complete the following steps:

  1. Open the Amazon VPC console.
  2. In the navigation pane, choose Endpoint services.
  3. Select the endpoint services that are associated with the Network Load Balancer.
  4. Choose Actions, and then select Associate or disassociate load balancers.
  5. Clear the selection for the Network Load Balancer that you want to delete, and then select another Network Load Balancer to replace it.
  6. Delete the Network Load Balancer.

Delete a Network Load Balancer and associated endpoint services

If you chose to delete the Network Load Balancer and the associated endpoint services, then complete the following steps:

  1. Open the Amazon VPC console.
  2. Select the endpoint services that you want to delete. For more information, see Delete an endpoint service.
  3. On the Endpoint connections tab, choose Actions.
  4. Reject the endpoint connection requests for any connections that aren't in the Rejected state.
  5. Delete any VPC endpoints within the same AWS account that are associated with the endpoint services.
  6. Select Actions, and then delete each endpoint service.
  7. Delete the Network Load Balancer.
2 Comments

The answer for deleting the NLB and VPC endpoint appears to be incomplete – I had to first reject the connection request, before I could delete the VPCE (and therfore the Load Balancer). See https://stackoverflow.com/a/69127426/48340 for complete instructions.

replied 2 years ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
EXPERT
replied 2 years ago