Skip to content

aws.lightsail.get_load_balancer

Example SQL Queries

SELECT * FROM
aws.lightsail.get_load_balancer
WHERE
"load_balancer_name" = 'VALUE';

Description

Returns information about the specified Lightsail load balancer.

Table Definition

Column NameColumn Data Type
load_balancer_name Required Input Column

The name of the load balancer.

VARCHAR
_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
load_balancer

An object containing information about your load balancer.

STRUCT(
"name" VARCHAR,
"arn" VARCHAR,
"support_code" VARCHAR,
"created_at" TIMESTAMP_S,
"location" STRUCT(
"availability_zone" VARCHAR,
"region_name" VARCHAR
),
"resource_type" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"dns_name" VARCHAR,
"state" VARCHAR,
"protocol" VARCHAR,
"public_ports" BIGINT[],
"health_check_path" VARCHAR,
"instance_port" BIGINT,
"instance_health_summary" STRUCT(
"instance_name" VARCHAR,
"instance_health" VARCHAR,
"instance_health_reason" VARCHAR
)[],
"tls_certificate_summaries" STRUCT(
"name" VARCHAR,
"is_attached" BOOLEAN
)[],
"configuration_options" MAP(VARCHAR, VARCHAR),
"ip_address_type" VARCHAR,
"https_redirection_enabled" BOOLEAN,
"tls_policy_name" VARCHAR
)
Show child fields
load_balancer.arn

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

load_balancer.configuration_options

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

load_balancer.created_at

The date when your load balancer was created.

load_balancer.dns_name

The DNS name of your Lightsail load balancer.

load_balancer.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.

load_balancer.https_redirection_enabled

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

load_balancer.instance_health_summary[]
Show child fields
load_balancer.instance_health_summary[].instance_health

Describes the overall instance health. Valid values are below.

load_balancer.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.

load_balancer.instance_health_summary[].instance_name

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

load_balancer.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.

load_balancer.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.

load_balancer.location

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

Show child fields
load_balancer.location.availability_zone

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

load_balancer.location.region_name

The Amazon Web Services Region name.

load_balancer.name

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

load_balancer.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.

load_balancer.public_ports[]
load_balancer.resource_type

The resource type (LoadBalancer.

load_balancer.state

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

load_balancer.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.

load_balancer.tags[]
Show child fields
load_balancer.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: + - = . _ :/@

load_balancer.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: + - = . _ :/@

load_balancer.tls_certificate_summaries[]
Show child fields
load_balancer.tls_certificate_summaries[].is_attached

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

load_balancer.tls_certificate_summaries[].name

The name of the SSL/TLS certificate.

load_balancer.tls_policy_name

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