Elastic Load Balancing
Developer Guide (API Version 2011-11-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Detaching Your Load Balancer from a Subnet

This example walks you through the process of detaching a subnet from your load balancer using either the AWS Management Console, the Query API, or the command line interfaces.

Using AWS Management Console

To detach your load balancer from subnet

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. Click Load Balancers in the Navigation pane.

  3. On the Load Balancers page, select the load balancer that you created for your VPC.

  4. The bottom pane displays the details of your load balancer.

  5. Click the Instances tab.

  6. In the Availability Zones table, click the red minus sign at the right to detach a subnet.

  7. The Add and Remove Subnets page is displayed.

    Detach Subnet

  8. In the Selected Subnets table, click the red circle x to the left of the subnet you want to detach.

  9. The detached subnet becomes available and is displayed in the Available Subnets table.

  10. Click Save to detach the subnet from your load balancer.

Using the Query API

To detach your load balancer from subnet

  1. Call DetachLoadBalancerFromSubnets with the following parameters:

    • Subnets = subnet-450f512c

    • LoadBalancerName = MyVPCLoadBalancer

  2. The operation returns the subnet ID of the detached subnet.

For detailed descriptions of the Elastic Load Balancing API actions, see the Elastic Load Balancing API Reference.

Using the Command Line Interface

To detach your load balancer from subnet

  1. Enter the command elb-detach-lb-from-subnets as in the following example.

    PROMPT> elb-detach-lb-from-subnets  MyVPCLoadBalancer --subnets subnet-450f5127
  2. The operation returns the subnet ID of the detached subnet.

For detailed descriptions of the Elastic Load Balancing commands, see the Elastic Load Balancing Quick Reference Card.