Table: aws_route53_traffic_policy_instance - Query AWS Route 53 Traffic Policy Instances using SQL
The AWS Route 53 Traffic Policy Instance is a component of Amazon's scalable and highly available Domain Name System (DNS) web service. This resource allows you to manage complex DNS settings with reusable traffic policies and simplifies the process of routing internet traffic to your applications. It works by using DNS to direct incoming requests based on the routing rules defined in your traffic policy.
Table Usage Guide
The aws_route53_traffic_policy_instance
table in Steampipe provides you with information about Traffic Policy Instances within AWS Route 53. This table allows you, as a DevOps engineer, to query instance-specific details, including the instance ID, version, DNS name, and associated metadata. You can utilize this table to gather insights on traffic policy instances, such as their configuration, status, and more. The schema outlines the various attributes of the Traffic Policy Instance for you, including the ID, version, DNS name, and associated tags.
Examples
Basic Info
Explore which traffic policy instances are currently active within your AWS Route53 service. This can help you manage your DNS configurations more effectively and ensure optimal routing of your network traffic.
select name, id, hosted_zone_id, ttl, regionfrom aws_route53_traffic_policy_instance;
select name, id, hosted_zone_id, ttl, regionfrom aws_route53_traffic_policy_instance;
List associated hosted zone details for each instance
The query is designed to provide insights into the relationship between different instances and their associated hosted zones. This can be useful for understanding how traffic policies are being applied across various zones in a network, which can aid in network management and troubleshooting.
select i.name, i.id, h.id as hosted_zone_id, h.name as hosted_zone_name, h.caller_reference, h.private_zonefrom aws_route53_traffic_policy_instance i join aws_route53_zone h on i.hosted_zone_id = h.id;
select i.name, i.id, h.id as hosted_zone_id, h.name as hosted_zone_name, h.caller_reference, h.private_zonefrom aws_route53_traffic_policy_instance as i join aws_route53_zone as h on i.hosted_zone_id = h.id;
List associated traffic policy details for each instance
Explore the relationship between traffic policy instances and their associated traffic policies in AWS Route 53. This query can be used to understand how each instance is linked to a specific policy, providing insights into the configuration and management of traffic flow within your network.
select i.name, i.id, traffic_policy_id, p.name as traffic_policy_name, traffic_policy_type, traffic_policy_version, p.documentfrom aws_route53_traffic_policy_instance i join aws_route53_traffic_policy p on i.traffic_policy_id = p.id and i.traffic_policy_version = p.version;
select i.name, i.id, traffic_policy_id, p.name as traffic_policy_name, traffic_policy_type, traffic_policy_version, p.documentfrom aws_route53_traffic_policy_instance as i join aws_route53_traffic_policy as p on i.traffic_policy_id = p.id and i.traffic_policy_version = p.version;
List instances that failed creation
Determine the areas in which creation of certain instances failed. This allows you to pinpoint specific locations where issues have occurred, aiding in troubleshooting and resolution.
select name, id, state, hosted_zone_id, message as failed_reasonfrom aws_route53_traffic_policy_instancewhere state = 'Failed';
select name, id, state, hosted_zone_id, message as failed_reasonfrom aws_route53_traffic_policy_instancewhere state = 'Failed';
Schema for aws_route53_traffic_policy_instance
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
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. | |
hosted_zone_id | text | The id of the hosted zone that Amazon Route 53 created resource record sets in. | |
id | text | = | The id that Amazon Route 53 assigned to the new traffic policy instance. |
message | text | If State is Failed, an explanation of the reason for the failure. | |
name | text | The DNS name for which Amazon Route 53 responds to queries. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
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. | |
state | text | Current state of the instance. | |
title | text | Title of the resource. | |
traffic_policy_id | text | The ID of the traffic policy that Amazon Route 53 used to create resource record sets in the specified hosted zone. | |
traffic_policy_type | text | The DNS type that Amazon Route 53 assigned to all of the resource record sets that it created for this traffic policy instance. | |
traffic_policy_version | bigint | The version of the traffic policy that Amazon Route 53 used to create resource record sets in the specified hosted zone. | |
ttl | bigint | The TTL that Amazon Route 53 assigned to all of the resource record sets that it created in the specified hosted zone. |
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_instance