Elastic Load Balancing
Developer Guide (API Version 2012-06-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

Delete a Listener from Your Load Balancer

The following examples show you how to delete a listener from the specified port of your existing load balancer.

Deleting a Listener Using the AWS Management Console

To delete a listener from your load balancer

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

  2. In the navigation pane, under NETWORK & SECURITY, click Load Balancers.

  3. Select your load balancer.

  4. In the bottom pane, select the Listeners tab.

  5. In the Listeners pane, click Edit.

  6. In the Edit Listeners page, click the delete icon next to the listener.

  7. Click Save.

Deleting a Listener Using the AWS CLI

To delete a listener from your load balancer

  1. Enter the delete-load-balancer-listeners command as in the following example.

    aws elb delete-load-balancer-listeners --load-balancer-name my-test-loadbalancer --load-balancer-ports 80
  2. Enter the describe-load-balancers command as in the following example to view the updated details of your load balancer my-test-loadbalancer.

    aws elb describe-load-balancers --load-balancer-name my-test-loadbalancer

    Elastic Load Balancing responds with a list of updated configurations of your load balancer.

    {
        "LoadBalancerDescriptions": [
            {
                "Subnets": [], 
                "CanonicalHostedZoneNameID": "Z3DZXE0Q79N41H", 
                "CanonicalHostedZoneName": "my-test-loadbalancer-012345678.us-east-1.elb.amazonaws.com", 
                "ListenerDescriptions": [
                    {
                        "Listener": {
                            "InstancePort": 443, 
                            "SSLCertificateId": "arn:aws:iam::55555555555:server-certificate/production/myservercert", 
                            "LoadBalancerPort": 443, 
                            "Protocol": "HTTPS", 
                            "InstanceProtocol": "HTTPS"
                        }, 
                        "PolicyNames": [
                            "MySSLNegotiationPolicy"
                        ]
                    }
                ], 
                "HealthCheck": {
                    "HealthyThreshold": 10, 
                    "Interval": 30, 
                    "Target": "HTTP:80/", 
                    "Timeout": 5, 
                    "UnhealthyThreshold": 2
                }, 
               "BackendServerDescriptions": [],                
                "Instances": [], 
                "DNSName": "my-test-loadbalancer-012345678.us-east-1.elb.amazonaws.com", 
                "SecurityGroups": [], 
                "Policies": {
                    "LBCookieStickinessPolicies": [], 
                    "AppCookieStickinessPolicies": [], 
                    "OtherPolicies": [                    
                        "ELBSecurityPolicy-2015-02"                 
                    ]
                }, 
                "LoadBalancerName": "my-test-loadbalancer", 
                "CreatedTime": "2014-03-19T03:24:02.650Z", 
                "AvailabilityZones": [
                    "us-east-1a"
                ], 
                "Scheme": "internet-facing", 
                "SourceSecurityGroup": {
                    "OwnerAlias": "amazon-elb", 
                    "GroupName": "amazon-elb-sg"
                }
            }
        ]
    }

Deleting a Listener Using the Query API

To delete a listener from your load balancer

Call the DeleteLoadBalancerListeners action with the following parameters:

  • LoadBalancerPorts = 80

  • LoadBalancerName = my-test-loadbalancer

Call the DescribeLoadBalancers action using the following parameter to view the updated configuration information of your load balancer.

  • LoadBalancerName = my-test-loadbalancer

The operation returns a list of updated configurations of your load balancer.