steampipe plugin install aws

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_id
from
aws_rds_db_subnet_group;
select
name,
status,
vpc_id
from
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_status
from
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_status
from
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,
tags
from
aws_rds_db_subnet_group
where
not tags :: JSONB ? 'application';
select
name,
tags
from
aws_rds_db_subnet_group
where
json_extract(tags, '$.application') is null;

Schema for aws_rds_db_subnet_group

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe Amazon Resource Name (ARN) for the DB subnet group.
descriptiontextProvides the description of the DB subnet group.
nametext=The friendly name to identify the DB subnet group.
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.
statustextProvides the status of the DB subnet group.
subnetsjsonbA list of Subnet elements.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached to the DB subnet group.
titletextTitle of the resource.
vpc_idtextProvides 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