Getting Information About Your Load Balancers

You can get information about your load balancers using AWS CLI.

If you exceed the number of identical requests allowed for a configured time period, the Throttling error message is returned.

This procedure uses AWS CLI only. Information about these resources is also available from Cockpit. For more information, see Load Balancers User Interface.

To get information about your load balancers, use the describe-load-balancers command following this syntax:

Request sample
$ aws elb describe-load-balancers \
    --profile YOUR_PROFILE \
    --load-balancer-names my-load-balancer \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) load-balancer-names: The name of one or more load balancers.

    If you do not specify any load balancer name, the request returns a description of all your load balancers.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-load-balancers command returns the following elements:

  • LoadBalancerDescriptions: Information about one or more load balancers. This element contains the following information for each load balancer:

    • Subnets: The ID of the subnet in which the load balancer was created, if it is in a VPC.

    • ListenerDescriptions: Information about one or more listeners added to the load balancer. This element contains the following information for each listener:

      • Listener: Information about a listener:

        • InstancePort: The port on which the backend instances are listening.

        • LoadBalancerPort: The port on which the load balancer is listening.

        • Protocol: The routing protocol of the load balancer (HTTP, HTTPS, TCP or SSL).

        • InstanceProtocol: The protocol used for routing traffic to backend instances (HTTP or TCP).

      • PolicyNames: The names of the policies attached to the load balancer, if any.

    • HealthCheck: Information about the health check configuration for the load balancer. This element contains the following information:

      • HealthyThreshold: The number of consecutive successful pings to consider the instance as healthy.

      • Interval: The number of seconds between two pings.

      • Target: The port and protocol for backend instances targeted by the health check (and the path to check for HTTP protocol).

      • Timeout: The maximum waiting time for a response before considering the ping as failed, in seconds.

      • UnhealthyThreshold: The number of consecutive failed pings to consider the instance as unhealthy.

    • VPCId: The VPC ID for the load balancer, if any.

    • BackendServerDescriptions: Information about the backend instances. This element contains the following information for each backend instance:

      • InstancePort: The port on which backend instances are listening.

      • PolicyNames: The names of the policies enabled for backend instances, if any.

    • Instances: Information about one or more backend instances. This element contains the following information for each backend instance:

      • InstanceId: The ID of the backend instance.

    • DNSName: The DNS name for the load balancer.

    • SecurityGroups: The security groups for the load balancer, if it is in a VPC.

    • Policies: Information about the policies for the load balancer, if any.

    • LoadBalancerName: The name of the load balancer.

    • CreatedTime: The date and time of creation of the load balancer.

    • AvailabilityZones: The ID of the Availability Zone in which the load balancer was created.

    • Scheme: The type of load balancer. For more information, see About Load Balancers > Load Balancer Types.

Result Sample
{
  "LoadBalancerDescriptions": [
    {
      "Subnets": [
          "subnet-12345678"
      ],
      "ListenerDescriptions": [
          {
              "Listener": {
                  "InstancePort": 80,
                  "LoadBalancerPort": 80,
                  "Protocol": "HTTP",
                  "InstanceProtocol": "HTTP"
              },
              "PolicyNames": []
          },
      ],
      "HealthCheck": {
          "HealthyThreshold": 3,
          "Interval": 15,
          "Target": "HTTP:80/index.html",
          "Timeout": 3,
          "UnhealthyThreshold": 3
      },
      "VPCId": "vpc-87654321",
      "BackendServerDescriptions": [
          {
              "InstancePort": 80,
              "PolicyNames": []
          }
      ],
      "Instances": [
          {
              "InstanceId": "i-56781234"
          },
          {
              "InstanceId": "i-43218765"
          }
      ],
      "DNSName": "my-load-balancer-1234567890.lbu.eu-west-2.outscale.com",
      "SecurityGroups": [
          "sg-18273465"
      ],
      "Policies": {
          "LBCookieStickinessPolicies": [],
          "AppCookieStickinessPolicies": [],
          "OtherPolicies": []
      },
      "LoadBalancerName": "my-load-balancer",
      "CreatedTime": "2016-05-12T05:22:08.364Z",
      "AvailabilityZones": [
          "eu-west-2a"
      ],
      "Scheme": "internet-facing",
      "SourceSecurityGroup": {
          "OwnerAlias": "123456789012",
          "GroupName": "my-lb-sg"
      }
    }
  ]
}

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.