steampipe plugin install aws

Table: aws_rds_reserved_db_instance - Query AWS RDS Reserved DB Instances using SQL

The AWS RDS Reserved DB Instance is a reservation of resources within the Amazon Relational Database Service. This reservation allows you to receive a significant discount, compared to the on-demand instance pricing, by committing to a one or three year term for using DB Instances. It provides a cost-effective solution to reserve capacity for your Amazon RDS instances in a specific region.

Table Usage Guide

The aws_rds_reserved_db_instance table in Steampipe provides you with information about Reserved DB Instances within Amazon Relational Database Service (RDS). This table enables you, as a database administrator or DevOps engineer, to query detailed information about reserved instances, including the reservation identifier, instance type, duration, and associated costs. You can utilize this table to gather insights on your reserved instances, such as understanding cost allocation, planning capacity, and managing reservations. The schema outlines the various attributes of the Reserved DB Instance for you, including the reservation ARN, offering type, recurring charges, and associated tags.

Examples

Basic info

Explore the status and details of your reserved database instances in AWS RDS to better manage your database resources and costs.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance;
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance;

List reserved DB instances with multi-AZ disabled

Identify instances where the database instances reserved on AWS RDS do not have the multi-Availability Zone feature enabled. This is useful to pinpoint potential areas of vulnerability in your database architecture, as disabling multi-AZ can impact data redundancy and failover support.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
where
not multi_az;
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
where
multi_az = 0;

List reserved DB instances with offering type All Upfront

Identify instances where database reservations have been made with an 'All Upfront' offering type in AWS RDS. This can be useful for cost analysis and budgeting as it highlights where upfront payments have been made for database services.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
where
offering_type = 'All Upfront';
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
where
offering_type = 'All Upfront';

List reserved DB instances order by duration

Discover the segments that have reserved database instances, organized by their duration. This can be particularly useful for prioritizing and managing resources effectively within your AWS RDS environment.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
order by
duration desc;
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class
from
aws_rds_reserved_db_instance
order by
duration desc;

List reserved DB instances order by usage price

Identify the most expensive reserved database instances in your AWS RDS service. This can help prioritize cost management efforts and optimize your cloud resource allocation.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class,
usage_price
from
aws_rds_reserved_db_instance
order by
usage_price desc;
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class,
usage_price
from
aws_rds_reserved_db_instance
order by
usage_price desc;

List reserved DB instances which are not active

Explore which reserved database instances are not currently active. This can help in managing resources and costs by identifying unused or underutilized instances.

select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class,
usage_price
from
aws_rds_reserved_db_instance
where
state <> 'active';
select
reserved_db_instance_id,
arn,
reserved_db_instances_offering_id,
state,
class,
usage_price
from
aws_rds_reserved_db_instance
where
state != 'active';

Schema for aws_rds_reserved_db_instance

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 reserved DB Instance.
classtext=The DB instance class for the reserved DB instance.
currency_codetextThe currency code for the reserved DB instance.
db_instance_countbigintThe number of reserved DB instances.
durationbigint=The duration of the reservation in seconds.
fixed_pricedouble precisionThe fixed price charged for this reserved DB instance.
lease_idtext=The unique identifier for the lease associated with the reserved DB instance.
multi_azboolean=Indicates if the reservation applies to Multi-AZ deployments.
offering_typetext=The offering type of this reserved DB instance.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
product_descriptiontextThe description of the reserved DB instance.
recurring_chargesjsonbThe recurring price charged to run this reserved DB instance.
regiontextThe AWS Region in which the resource is located.
reserved_db_instance_idtext=The unique identifier for the reservation.
reserved_db_instances_offering_idtext=The offering identifier.
start_timetimestamp with time zoneThe time the reservation started.
statetextThe state of the reserved DB instance.
titletextTitle of the resource.
usage_pricedouble precisionThe hourly price charged for this reserved DB instance.

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_reserved_db_instance