Table: aws_globalaccelerator_listener - Query AWS Global Accelerator Listener using SQL
The AWS Global Accelerator Listener is a component of AWS Global Accelerator that checks for connections from clients to accelerators based on the protocol and port (or port range) defined. It directs traffic to optimal endpoints over the AWS global network to improve the availability and performance of your applications. This service is highly beneficial for globally distributed applications, ensuring lower latency and higher reliability.
Table Usage Guide
The aws_globalaccelerator_listener
table in Steampipe provides you with information about each listener that processes inbound connections based on the port or port ranges that you configure. This table allows you as a network engineer to query listener-specific details, including Accelerator ARN, Listener ARN, Client Affinity, and associated metadata. You can utilize this table to gather insights on listeners, such as which listeners are processing inbound connections, what port ranges are being used, and more. The schema outlines the various attributes of the Global Accelerator Listener for you, including the listener ARN, accelerator ARN, client affinity, and port ranges.
Examples
Basic info
Explore the configuration of your AWS Global Accelerator Listener to understand the protocol and port ranges, as well as client affinity settings. This can assist in optimizing network performance and traffic routing.
select title, client_affinity, port_ranges, protocolfrom aws_globalaccelerator_listener;
select title, client_affinity, port_ranges, protocolfrom aws_globalaccelerator_listener;
List listeners for a specific accelerator
Determine the areas in which a specific global accelerator is active, by identifying its associated listeners. This could be useful in understanding the reach and distribution of your network traffic.
select title, client_affinity, port_ranges, protocolfrom aws_globalaccelerator_listenerwhere accelerator_arn = 'arn:aws:globalaccelerator::012345678901:accelerator/1234abcd';
select title, client_affinity, port_ranges, protocolfrom aws_globalaccelerator_listenerwhere accelerator_arn = 'arn:aws:globalaccelerator::012345678901:accelerator/1234abcd';
Basic info for all accelerators and listeners
Explore the status and configurations of all accelerators and listeners in your AWS Global Accelerator to identify potential areas for optimization or troubleshooting. This is particularly useful in managing network traffic and ensuring efficient routing.
select a.name as accelerator_name, a.status as accelerator_status, l.title as listener_title, l.client_affinity as listener_client_affinity, l.port_ranges as listener_port_ranges, l.protocol as listener_protocolfrom aws_globalaccelerator_accelerator a, aws_globalaccelerator_listener lwhere l.accelerator_arn = a.arn;
select a.name as accelerator_name, a.status as accelerator_status, l.title as listener_title, l.client_affinity as listener_client_affinity, l.port_ranges as listener_port_ranges, l.protocol as listener_protocolfrom aws_globalaccelerator_accelerator a join aws_globalaccelerator_listener l on l.accelerator_arn = a.arn;
List accelerators listening on TCP port 443
Determine the areas in which accelerators are actively listening on the TCP port 443. This can be useful for network troubleshooting or for identifying potential security vulnerabilities.
select a.name as accelerator_name, a.status as accelerator_status, l.protocol, port_range -> 'FromPort' as from_port, port_range -> 'ToPort' as to_portfrom aws_globalaccelerator_accelerator a, aws_globalaccelerator_listener l, jsonb_array_elements(l.port_ranges) as port_rangewhere l.accelerator_arn = a.arn and l.protocol = 'TCP' and (port_range -> 'FromPort') :: int <= 443 and (port_range -> 'ToPort') :: int >= 443;
select a.name as accelerator_name, a.status as accelerator_status, l.protocol, json_extract(port_range.value, '$.FromPort') as from_port, json_extract(port_range.value, '$.ToPort') as to_portfrom aws_globalaccelerator_accelerator a, aws_globalaccelerator_listener l, json_each(l.port_ranges) as port_rangewhere l.accelerator_arn = a.arn and l.protocol = 'TCP' and json_extract(port_range.value, '$.FromPort') <= 443 and json_extract(port_range.value, '$.ToPort') >= 443;
Schema for aws_globalaccelerator_listener
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
accelerator_arn | text | = | The Amazon Resource Name (ARN) of parent accelerator. |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
arn | text | = | The Amazon Resource Name (ARN) of the listener. |
client_affinity | text | Client affinity setting for the listener. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
port_ranges | jsonb | The list of port ranges for the connections from clients to the accelerator. | |
protocol | text | The protocol for the connections from clients to the accelerator. | |
region | text | The AWS Region in which the resource is located. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws
You can pass the configuration to the command with the --config
argument:
steampipe_export_aws --config '<your_config>' aws_globalaccelerator_listener