Table: aws_rds_db_instance_automated_backup - Query AWS RDS DB Instance Automated Backups using SQL
The AWS RDS DB Instance Automated Backup is a feature of Amazon RDS that enables automated backups of your DB instances. These backups include transaction logs so that you can perform a point-in-time recovery of your databases. Automated backups are kept for a specified, configurable period, allowing you to restore the database to any point in time during that period.
Table Usage Guide
The aws_rds_db_instance_automated_backup
table in Steampipe allows you to query AWS RDS DB Instance Automated Backups. This table provides you with data about automated backups for RDS DB instances. It enables you, as a DevOps engineer, database administrator, or other technical professional, to query backup-specific details, including backup status, retention period, and associated metadata. You can utilize this table to gather insights on backups, such as backup statuses, encrypted backups, verification of backup retention periods, and more. The schema outlines the various attributes of the automated backup for you, including the backup ARN, backup creation date, backup size, and associated tags.
Examples
Basic info
Discover the segments that are encrypted within your automated backup instances on AWS RDS, enabling you to assess the elements within your database that are secure. This is particularly useful when managing data security and ensuring compliance with data protection regulations.
select db_instance_identifier, arn, status, allocated_storage, encrypted, enginefrom aws_rds_db_instance_automated_backup;
select db_instance_identifier, arn, status, allocated_storage, encrypted, enginefrom aws_rds_db_instance_automated_backup;
List DB instance automated backups that are not encrypted
Identify instances where automated backups of your database are not encrypted. This can be useful to enhance your data security by ensuring all backups are encrypted.
select db_instance_identifier, arn, status, backup_target, instance_create_time, encrypted, enginefrom aws_rds_db_instance_automated_backupwhere not encrypted;
select db_instance_identifier, arn, status, backup_target, instance_create_time, encrypted, enginefrom aws_rds_db_instance_automated_backupwhere encrypted = 0;
List DB instance automated backups that are not authenticated through IAM users and roles
Identify instances where automated backups of the database are not authenticated through IAM users and roles. This is useful for ensuring all backups have the necessary security measures in place.
select db_instance_identifier, iam_database_authentication_enabled, status, availability_zone, dbi_resource_idfrom aws_rds_db_instance_automated_backupwhere not iam_database_authentication_enabled;
select db_instance_identifier, iam_database_authentication_enabled, status, availability_zone, dbi_resource_idfrom aws_rds_db_instance_automated_backupwhere iam_database_authentication_enabled = 0;
Get VPC and subnet info for each DB instance automated backup
This example helps you analyze the relationship between your automated backup instances for your database and their associated virtual private clouds (VPC) and subnets. It's useful for understanding your infrastructure setup and how your database backups are distributed across different VPCs.
select b.arn, b.vpc_id, v.cidr_block, v.is_default, v.instance_tenancyfrom aws_rds_db_instance_automated_backup as b, aws_vpc as vwhere v.vpc_id = b.vpc_id;
select b.arn, b.vpc_id, v.cidr_block, v.is_default, v.instance_tenancyfrom aws_rds_db_instance_automated_backup as b join aws_vpc as v on v.vpc_id = b.vpc_id;
List DB instance automated backups of deleted instances
Discover the segments that are retaining automated backups of deleted database instances. This can be helpful in identifying instances where you may want to free up storage or ensure data from deleted instances is properly archived.
select db_instance_identifier, arn, engine, engine_version, availability_zone, backup_retention_period, statusfrom aws_rds_db_instance_automated_backupwhere status = 'retained';
select db_instance_identifier, arn, engine, engine_version, availability_zone, backup_retention_period, statusfrom aws_rds_db_instance_automated_backupwhere status = 'retained';
Get KMS key details of each DB instance automated backup
Determine the areas in which each database instance's automated backup uses a specific Key Management Service (KMS) key. This can help in understanding the security measures in place and the overall configuration of database backups.
select b.db_instance_identifier, b.arn as automated_backup_arn, b.engine, b.kms_key_id, k.creation_date as kms_key_creation_date, k.key_state, k.key_rotation_enabledfrom aws_rds_db_instance_automated_backup as b, aws_kms_key as kwhere k.id = b.kms_key_id;
select b.db_instance_identifier, b.arn as automated_backup_arn, b.engine, b.kms_key_id, k.creation_date as kms_key_creation_date, k.key_state, k.key_rotation_enabledfrom aws_rds_db_instance_automated_backup as b, aws_kms_key as kwhere k.id = b.kms_key_id;
Schema for aws_rds_db_instance_automated_backup
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. | |
allocated_storage | bigint | Specifies the allocated storage size in gibibytes (GiB). | |
arn | text | = | The Amazon Resource Name (ARN) for the replicated automated backups. |
availability_zone | text | The Availability Zone that the automated backup was created in. | |
aws_backup_recovery_point_arn | text | The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services Backup. | |
backup_retention_period | bigint | The retention period for the automated backups. | |
backup_target | text | Specifies where automated backups are stored: Amazon Web Services Outposts or the Amazon Web Services Region. | |
db_instance_arn | text | The Amazon Resource Name (ARN) for the automated backups. | |
db_instance_automated_backups_replications | jsonb | The list of replications to different Amazon Web Services Regions associated with the automated backup. | |
db_instance_identifier | text | = | The friendly name to identify the DB Instance. |
dbi_resource_id | text | = | The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region. |
dedicated_log_volume | boolean | Indicates whether the DB instance has a dedicated log volume (DLV) enabled. | |
encrypted | boolean | Specifies whether the automated backup is encrypted. | |
engine | text | The name of the database engine for this automated backup. | |
engine_version | text | The version of the database engine for the automated backup. | |
iam_database_authentication_enabled | boolean | True if mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. | |
instance_create_time | timestamp with time zone | True if mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. | |
iops | bigint | True if mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. | |
kms_key_id | text | The Amazon Web Services KMS key ID for an automated backup. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. | |
license_model | text | The Amazon Web Services KMS key ID for an automated backup. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. | |
master_username | text | The license model of an automated backup. | |
multi_tenant | boolean | Specifies whether the automatic backup is for a DB instance in the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE). | |
option_group_name | text | The option group the automated backup is associated with. If omitted, the default option group for the engine specified is used. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
port | bigint | The port number that the automated backup used for connections. Default: Inherits from the source DB instance Valid Values: 1150-65535. | |
region | text | The AWS Region in which the resource is located. | |
restore_window | jsonb | Earliest and latest time an instance can be restored to. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | = | Specifies the current state of this database. |
storage_throughput | bigint | Specifies the storage throughput for the automated backup. | |
storage_type | text | Specifies the storage type associated with the automated backup. | |
tde_credential_arn | text | The ARN from the key store with which the automated backup is associated for TDE encryption. | |
timezone | text | The time zone of the automated backup. | |
title | text | Title of the resource. | |
vpc_id | text | Provides the VPC ID associated with the 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_db_instance_automated_backup