Skip to content

aws.lightsail.get_load_balancers

Example SQL Queries

SELECT * FROM
aws.lightsail.get_load_balancers;

Description

Returns information about all load balancers in an account.

Table Definition

Column NameColumn Data Type
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
arn

The Amazon Resource Name (ARN) of the load balancer.

VARCHAR
configuration_options

A string to string map of the configuration options for your load balancer. Valid values are listed below.

MAP(VARCHAR, VARCHAR)
created_at

The date when your load balancer was created.

TIMESTAMP_S
dns_name

The DNS name of your Lightsail load balancer.

VARCHAR
health_check_path

The path you specified to perform your health checks. If no path is specified, the load balancer tries to make a request to the default (root) page.

VARCHAR
https_redirection_enabled

A Boolean value that indicates whether HTTPS redirection is enabled for the load balancer.

BOOLEAN
instance_health_summary

An array of InstanceHealthSummary objects describing the health of the load balancer.

STRUCT(
"instance_name" VARCHAR,
"instance_health" VARCHAR,
"instance_health_reason" VARCHAR
)[]
Show child fields
instance_health_summary[]
Show child fields
instance_health_summary[].instance_health

Describes the overall instance health. Valid values are below.

instance_health_summary[].instance_health_reason

More information about the instance health. If the instanceHealth is healthy, then an instanceHealthReason value is not provided.

If instanceHealth is initial, the instanceHealthReason value can be one of the following:

  • Lb.RegistrationInProgress - The target instance is in the process of being registered with the load balancer.

  • Lb.InitialHealthChecking - The Lightsail load balancer is still sending the target instance the minimum number of health checks required to determine its health status.

If instanceHealth is unhealthy, the instanceHealthReason value can be one of the following:

  • Instance.ResponseCodeMismatch - The health checks did not return an expected HTTP code.

  • Instance.Timeout - The health check requests timed out.

  • Instance.FailedHealthChecks - The health checks failed because the connection to the target instance timed out, the target instance response was malformed, or the target instance failed the health check for an unknown reason.

  • Lb.InternalError - The health checks failed due to an internal error.

If instanceHealth is unused, the instanceHealthReason value can be one of the following:

  • Instance.NotRegistered - The target instance is not registered with the target group.

  • Instance.NotInUse - The target group is not used by any load balancer, or the target instance is in an Availability Zone that is not enabled for its load balancer.

  • Instance.IpUnusable - The target IP address is reserved for use by a Lightsail load balancer.

  • Instance.InvalidState - The target is in the stopped or terminated state.

If instanceHealth is draining, the instanceHealthReason value can be one of the following:

  • Instance.DeregistrationInProgress - The target instance is in the process of being deregistered and the deregistration delay period has not expired.

instance_health_summary[].instance_name

The name of the Lightsail instance for which you are requesting health check data.

instance_port

The port where the load balancer will direct traffic to your Lightsail instances. For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443.

BIGINT
ip_address_type

The IP address type of the load balancer.

The possible values are ipv4 for IPv4 only, ipv6 for IPv6 only, and dualstack for IPv4 and IPv6.

VARCHAR
location

The AWS Region where your load balancer was created (us-east-2a). Lightsail automatically creates your load balancer across Availability Zones.

STRUCT(
"availability_zone" VARCHAR,
"region_name" VARCHAR
)
Show child fields
location.availability_zone

The Availability Zone. Follows the format us-east-2a (case-sensitive).

location.region_name

The Amazon Web Services Region name.

name

The name of the load balancer (my-load-balancer).

VARCHAR
protocol

The protocol you have enabled for your load balancer. Valid values are below.

You can't just have HTTP_HTTPS, but you can have just HTTP.

VARCHAR
public_ports

An array of public port settings for your load balancer. For HTTP, use port 80. For HTTPS, use port 443.

BIGINT[]
Show child fields
public_ports[]
resource_type

The resource type (LoadBalancer.

VARCHAR
state

The status of your load balancer. Valid values are below.

VARCHAR
support_code

The support code. Include this code in your email to support when you have questions about your Lightsail load balancer. This code enables our support team to look up your Lightsail information more easily.

VARCHAR
tags

The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
Show child fields
tags[]
Show child fields
tags[].key

The key of the tag.

Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

tags[].value

The value of the tag.

Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

tls_certificate_summaries

An array of LoadBalancerTlsCertificateSummary objects that provide additional information about the SSL/TLS certificates. For example, if true, the certificate is attached to the load balancer.

STRUCT(
"name" VARCHAR,
"is_attached" BOOLEAN
)[]
Show child fields
tls_certificate_summaries[]
Show child fields
tls_certificate_summaries[].is_attached

When true, the SSL/TLS certificate is attached to the Lightsail load balancer.

tls_certificate_summaries[].name

The name of the SSL/TLS certificate.

tls_policy_name

The name of the TLS security policy for the load balancer.

VARCHAR