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, regionfrom aws_keyspaces_table;
select table_name, arn, status, creation_timestamp, regionfrom 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, statusfrom aws_keyspaces_tablewhere status = 'ACTIVE';
select table_name, arn, statusfrom aws_keyspaces_tablewhere 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_identifierfrom aws_keyspaces_tablewhere encryption_specification_type = 'AWS_OWNED_KMS_KEY';
select table_name, arn, encryption_specification_type, kms_key_identifierfrom aws_keyspaces_tablewhere 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_timestampfrom aws_keyspaces_tableorder by creation_timestamp desc;
select table_name, arn, creation_timestampfrom aws_keyspaces_tableorder 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_statusfrom aws_keyspaces_tablewhere default_time_to_live is not null;
select table_name, arn, default_time_to_live, ttl_statusfrom aws_keyspaces_tablewhere 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_definitionfrom aws_keyspaces_tablewhere keyspace_name = 'myKey';
select table_name, arn, schema_definitionfrom aws_keyspaces_tablewhere 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_recoveryfrom aws_keyspaces_tablewhere (point_in_time_recovery ->> 'status') = 'ENABLED';
select table_name, arn, point_in_time_recoveryfrom aws_keyspaces_tablewhere json_extract(point_in_time_recovery, '$.status') = 'ENABLED';
Schema for aws_keyspaces_table
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. | |
arn | text | The unique identifier of the table in the format of an Amazon Resource Name (ARN). | |
capacity_specification | jsonb | The read/write throughput capacity mode for a table. | |
client_side_timestamps_status | text | Shows how to enable client-side timestamps settings for the specified table. | |
comment_message | text | An optional description of the table. | |
creation_timestamp | timestamp with time zone | The creation timestamp of the specified table. | |
default_time_to_live | bigint | The default Time to Live settings in seconds of the specified table. | |
encryption_specification_type | text | The encryption option specified for the table. | |
keyspace_name | text | = | The name of the keyspace that the table is stored in. |
kms_key_identifier | text | The Amazon Resource Name (ARN) of the customer managed KMS key, | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
point_in_time_recovery | jsonb | The point-in-time recovery status of the specified table. | |
region | text | The AWS Region in which the resource is located. | |
replica_specifications | jsonb | Returns the Amazon Web Services Region specific settings of all Regions a multi-Region table is replicated in. | |
schema_definition | jsonb | The schema definition of the specified table. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The current status of the specified table. | |
table_name | text | = | The name of the table. |
title | text | Title of the resource. | |
ttl_status | text | The 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