steampipe plugin install aws

Table: aws_keyspaces_table - Query AWS Keyspaces Tables using SQL

Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and managed Apache Cassandra-compatible database service. It enables you to run Cassandra workloads on AWS without managing the underlying infrastructure. The aws_keyspaces_table table in Steampipe allows you to query information about your Keyspaces tables in AWS, including their capacity specifications, encryption settings, and schema definitions.

Table Usage Guide

The aws_keyspaces_table table enables cloud administrators and DevOps engineers to gather detailed insights into their Keyspaces tables. You can query various aspects of the table, such as its creation timestamp, throughput capacity, encryption, and status. This table is particularly useful for monitoring table performance, ensuring security compliance, and managing table configurations.

Examples

Basic table information

Retrieve basic information about your AWS Keyspaces tables, including their name, ARN, status, and region. This can be useful for getting an overview of the tables deployed in your AWS account.

select
table_name,
arn,
status,
creation_timestamp,
region
from
aws_keyspaces_table;
select
table_name,
arn,
status,
creation_timestamp,
region
from
aws_keyspaces_table;

List active tables

Fetch a list of tables that are currently active. This can help in identifying which tables are operational and available for use.

select
table_name,
arn,
status
from
aws_keyspaces_table
where
status = 'ACTIVE';
select
table_name,
arn,
status
from
aws_keyspaces_table
where
status = 'ACTIVE';

List tables with specific encryption settings

Identify tables that have specific encryption settings, which can help ensure that your data is secured according to your organization’s encryption policies.

select
table_name,
arn,
encryption_specification_type,
kms_key_identifier
from
aws_keyspaces_table
where
encryption_specification_type = 'AWS_OWNED_KMS_KEY';
select
table_name,
arn,
encryption_specification_type,
kms_key_identifier
from
aws_keyspaces_table
where
encryption_specification_type = 'AWS_OWNED_KMS_KEY';

List tables by creation date

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

select
table_name,
arn,
creation_timestamp
from
aws_keyspaces_table
order by
creation_timestamp desc;
select
table_name,
arn,
creation_timestamp
from
aws_keyspaces_table
order by
creation_timestamp desc;

List tables with default Time to Live (TTL) settings

Identify tables that have a specific default Time to Live (TTL) setting, which is useful for managing data retention and ensuring compliance with data lifecycle policies.

select
table_name,
arn,
default_time_to_live,
ttl_status
from
aws_keyspaces_table
where
default_time_to_live is not null;
select
table_name,
arn,
default_time_to_live,
ttl_status
from
aws_keyspaces_table
where
default_time_to_live is not null;

Get table schema definitions

Retrieve detailed schema definitions for your Keyspaces tables, which can help in understanding the structure and types of data stored in the tables.

select
table_name,
arn,
schema_definition
from
aws_keyspaces_table
where
keyspace_name = 'myKey';
select
table_name,
arn,
schema_definition
from
aws_keyspaces_table
where
keyspace_name = 'myKey';

List tables with Point-in-Time Recovery (PITR) enabled

Identify tables where Point-in-Time Recovery (PITR) is enabled, which is essential for ensuring that you can restore your table to a previous state within a specified timeframe.

select
table_name,
arn,
point_in_time_recovery
from
aws_keyspaces_table
where
(point_in_time_recovery ->> 'status') = 'ENABLED';
select
table_name,
arn,
point_in_time_recovery
from
aws_keyspaces_table
where
json_extract(point_in_time_recovery, '$.status') = 'ENABLED';

Schema for aws_keyspaces_table

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 unique identifier of the table in the format of an Amazon Resource Name (ARN).
capacity_specificationjsonbThe read/write throughput capacity mode for a table.
client_side_timestamps_statustextShows how to enable client-side timestamps settings for the specified table.
comment_messagetextAn optional description of the table.
creation_timestamptimestamp with time zoneThe creation timestamp of the specified table.
default_time_to_livebigintThe default Time to Live settings in seconds of the specified table.
encryption_specification_typetextThe encryption option specified for the table.
keyspace_nametext=The name of the keyspace that the table is stored in.
kms_key_identifiertextThe Amazon Resource Name (ARN) of the customer managed KMS key,
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
point_in_time_recoveryjsonbThe point-in-time recovery status of the specified table.
regiontextThe AWS Region in which the resource is located.
replica_specificationsjsonbReturns the Amazon Web Services Region specific settings of all Regions a multi-Region table is replicated in.
schema_definitionjsonbThe schema definition of the specified table.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe current status of the specified table.
table_nametext=The name of the table.
titletextTitle of the resource.
ttl_statustextThe custom Time to Live settings of the specified table.

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_keyspaces_table