steampipe plugin install aws

Table: aws_route53_traffic_policy - Query AWS Route 53 Traffic Policies using SQL

The AWS Route 53 Traffic Policy is a resource within Amazon's Route 53 service. It allows you to manage how traffic is routed to your application endpoints, enabling you to improve availability and latency. Using various routing types, like simple, failover, or geolocation routing, you can define more complex routes to optimize your application's performance.

Table Usage Guide

The aws_route53_traffic_policy table in Steampipe uses data from AWS Route 53 to provide you with information about each traffic policy's versions. This includes details such as the policy identifier, name, type, and document. Furthermore, it provides you with metadata related to the traffic policy. As a DevOps engineer or other user, you can utilize this table to query and analyze data related to traffic policies, including their versions and associated metadata. The schema outlines the various attributes of the traffic policy for you, including the policy ARN, version, type, document, and more.

Examples

Basic Info

Explore the specifics of your AWS Route53 traffic policies, such as their names, IDs, and versions, to gain a better understanding of your network's traffic routing configurations. This can be particularly useful for managing and optimizing your network traffic flow.

select
name,
id,
version,
document,
region
from
aws_route53_traffic_policy;
select
name,
id,
version,
document,
region
from
aws_route53_traffic_policy;

List policies with latest version

Discover the segments that have the most recent versions of policies. This is useful for maintaining up-to-date policy information and ensuring compliance with the latest versions.

select
name,
policy.id,
policy.version,
comment
from
aws_route53_traffic_policy policy,
(
select
id,
max(version) as version
from
aws_route53_traffic_policy
group by
id
) as latest
where
latest.id = policy.id
and latest.version = policy.version;
select
name,
policy.id,
policy.version,
comment
from
aws_route53_traffic_policy policy
join (
select
id,
max(version) as version
from
aws_route53_traffic_policy
group by
id
) as latest on latest.id = policy.id
and latest.version = policy.version;

List total policies in each dns type

Assess the distribution of policies across different DNS types to better understand your AWS Route53 traffic policy configuration. This can help in optimizing policy management and identifying potential areas for improvement.

select
document ->> 'RecordType' as dns_type,
count(id) as "policies"
from
aws_route53_traffic_policy
group by
dns_type;
select
json_extract(document, '$.RecordType') as dns_type,
count(id) as "policies"
from
aws_route53_traffic_policy
group by
dns_type;

Schema for aws_route53_traffic_policy

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
commenttextThe comment that you specified when traffic policy was created.
documentjsonbThe definition of a traffic policy in JSON format.
idtext=The ID that Amazon Route 53 assigned to a traffic policy when it was created.
nametextThe name that you specified when traffic policy was created.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
typetextThe DNS type of the resource record sets that Amazon Route 53 creates when you use a traffic policy to create a traffic policy instance.
versionbigint=The version number that Amazon Route 53 assigns to a traffic policy.

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_route53_traffic_policy