Table: aws_rds_db_subnet_group - Query AWS RDS DB Subnet Groups using SQL
The AWS RDS DB Subnet Group is a collection of subnets that you can designate for your Amazon RDS DB instances in a Virtual Private Cloud (VPC). This grouping allows you to configure network settings for your RDS instances, enhancing data security and connectivity. It serves as a bridge between an Amazon RDS and the related network, enabling the database service to operate seamlessly within the VPC.
Table Usage Guide
The aws_rds_db_subnet_group
table in Steampipe provides you with information about DB subnet groups within Amazon Relational Database Service (RDS). This table allows you, as a database administrator, developer, or other technical professional, to query details about DB subnet groups, including the subnet group name, description, VPC ID, and associated subnets. You can utilize this table to gather insights on DB subnet groups, such as subnet group configurations, associated VPCs, and more. The schema outlines the various attributes of the DB subnet group for you, including the subnet group status, ARN, and associated tags.
Examples
DB subnet group basic info
Analyze the status of your database subnet groups within your Virtual Private Cloud (VPC) to understand their operational state. This can be beneficial for maintaining the health and performance of your AWS RDS instances.
select name, status, vpc_idfrom aws_rds_db_subnet_group;
select name, status, vpc_idfrom aws_rds_db_subnet_group;
Subnets info of each subnet in subnet group
Determine the status and location details of each subnet within a subnet group in your AWS RDS, to understand their availability and configuration. This information can be crucial for managing your database's network performance and security.
select name, subnet -> 'SubnetAvailabilityZone' ->> 'Name' as subnet_availability_zone, subnet ->> 'SubnetIdentifier' as subnet_identifier, subnet -> 'SubnetOutpost' ->> 'Arn' as subnet_outpost, subnet ->> 'SubnetStatus' as subnet_statusfrom aws_rds_db_subnet_group cross join jsonb_array_elements(subnets) as subnet;
select name, json_extract(subnet.value, '$.SubnetAvailabilityZone.Name') as subnet_availability_zone, json_extract(subnet.value, '$.SubnetIdentifier') as subnet_identifier, json_extract(subnet.value, '$.SubnetOutpost.Arn') as subnet_outpost, json_extract(subnet.value, '$.SubnetStatus') as subnet_statusfrom aws_rds_db_subnet_group, json_each(subnets) as subnet;
List of subnet group without application tag key
Discover the segments that lack the 'application' tag key in your AWS RDS subnet groups. This can be useful in identifying potential areas for better resource tagging and management.
select name, tagsfrom aws_rds_db_subnet_groupwhere not tags :: JSONB ? 'application';
select name, tagsfrom aws_rds_db_subnet_groupwhere json_extract(tags, '$.application') is null;
Query examples
Control examples
Schema for aws_rds_db_subnet_group
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. | |
arn | text | The Amazon Resource Name (ARN) for the DB subnet group. | |
description | text | Provides the description of the DB subnet group. | |
name | text | = | The friendly name to identify the DB subnet group. |
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. | |
status | text | Provides the status of the DB subnet group. | |
subnets | jsonb | A list of Subnet elements. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags attached to the DB subnet group. | |
title | text | Title of the resource. | |
vpc_id | text | Provides the VpcId of the DB subnet group. |
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_rds_db_subnet_group