steampipe plugin install aws

Table: aws_timestreamwrite_database - Query AWS Timestream Databases using SQL

AWS Timestream is a fast, scalable, and fully managed time-series database service for IoT and operational applications. It is designed to store and analyze trillions of events per day at a fraction of the cost of relational databases. The aws_timestreamwrite_database table in Steampipe allows you to query information about Timestream databases in your AWS environment. This includes details like database creation time, encryption settings, table count, and more.

Table Usage Guide

The aws_timestreamwrite_database table enables DevOps engineers, cloud administrators, and data analysts to gather detailed insights on their Timestream databases. You can query various aspects of the database, such as its KMS encryption key, number of tables, and creation time. This table is particularly useful for monitoring database health, ensuring security compliance, and managing database configurations.

Examples

Basic database information

Retrieve basic information about your AWS Timestream databases, including their name, ARN, creation time, and region. This can be useful for getting an overview of the databases deployed in your AWS account.

select
database_name,
arn,
creation_time,
region,
kms_key_id
from
aws_timestreamwrite_database;
select
database_name,
arn,
creation_time,
region,
kms_key_id
from
aws_timestreamwrite_database;

List databases with a specific KMS key

Identify databases that are encrypted with a specific KMS key. This can help in ensuring that your data is secured according to your organization’s encryption policies.

select
database_name,
arn,
kms_key_id
from
aws_timestreamwrite_database
where
kms_key_id = 'your-kms-key-id';
select
database_name,
arn,
kms_key_id
from
aws_timestreamwrite_database
where
kms_key_id = 'your-kms-key-id';

List databases by creation date

Retrieve databases ordered by their creation date, which can be useful for auditing purposes or understanding the lifecycle of your Timestream databases.

select
database_name,
arn,
creation_time
from
aws_timestreamwrite_database
order by
creation_time desc;
select
database_name,
arn,
creation_time
from
aws_timestreamwrite_database
order by
creation_time desc;

List databases with the most tables

Identify the databases that contain the most tables, which can help in understanding data distribution and load across your Timestream environment.

select
database_name,
arn,
table_count
from
aws_timestreamwrite_database
order by
table_count desc;
select
database_name,
arn,
table_count
from
aws_timestreamwrite_database
order by
table_count desc;

Get database details with last updated time

Retrieve detailed information about your databases, including when they were last updated, to monitor changes and updates over time.

select
database_name,
arn,
last_updated_time,
region
from
aws_timestreamwrite_database;
select
database_name,
arn,
last_updated_time,
region
from
aws_timestreamwrite_database;

Schema for aws_timestreamwrite_database

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The 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 that uniquely identifies this database.
creation_timetimestamp with time zoneThe time when the database was created, calculated from the Unix epoch time.
database_nametext=The name of the Timestream database.
kms_key_idtextThe identifier of the KMS key used to encrypt the data stored in the database.
last_updated_timetimestamp with time zoneThe last time that this database was updated.
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.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
table_countbigintThe total number of tables found within a Timestream database.
titletextTitle of the resource.

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_timestreamwrite_database