Table: aws_neptune_db_cluster_snapshot - Query AWS Neptune DB Cluster Snapshots using SQL
AWS Neptune DB Cluster Snapshots are a point-in-time copy of data from an Amazon Neptune DB cluster. These snapshots can be used to restore a cluster to the specific time the snapshot was taken, which is useful for disaster recovery or data analysis purposes. They can be automatically or manually created and deleted within the Amazon Neptune service.
Table Usage Guide
The aws_neptune_db_cluster_snapshot
table in Steampipe provides you with information about DB Cluster Snapshots within Amazon Neptune. This table allows you, as a DevOps engineer, database administrator, or other technical professional, to query snapshot-specific details, including snapshot status, creation time, associated database engine, and more. You can utilize this table to gather insights on snapshots, such as their availability, encryption status, and associated database clusters. The schema outlines the various attributes of the Neptune DB Cluster Snapshot for you, including the snapshot ARN, creation time, associated tags, and more.
Examples
List of DB cluster snapshots which are not encrypted
Uncover the details of database cluster snapshots that lack encryption. This information is crucial for identifying potential security risks within your system.
select db_cluster_snapshot_identifier, snapshot_type, storage_encryptedfrom aws_neptune_db_cluster_snapshotwhere not storage_encrypted;
select db_cluster_snapshot_identifier, snapshot_type, storage_encryptedfrom aws_neptune_db_cluster_snapshotwhere storage_encrypted = 0;
DB cluster info of each snapshot
Explore the creation times, engines used, and licensing models of different database clusters. This is beneficial for understanding the configuration and setup of each database cluster in your AWS Neptune service.
select db_cluster_snapshot_identifier, cluster_create_time, engine, engine_version, license_modelfrom aws_neptune_db_cluster_snapshot;
select db_cluster_snapshot_identifier, cluster_create_time, engine, engine_version, license_modelfrom aws_neptune_db_cluster_snapshot;
DB cluster snapshot count per DB cluster
Explore the number of snapshots created for each database cluster to assess the frequency of data backup and to ensure data recovery readiness in case of a failure. This is crucial for maintaining data integrity and minimizing potential data loss.
select db_cluster_identifier, count(db_cluster_snapshot_identifier) snapshot_countfrom aws_neptune_db_cluster_snapshotgroup by db_cluster_identifier;
select db_cluster_identifier, count(db_cluster_snapshot_identifier) snapshot_countfrom aws_neptune_db_cluster_snapshotgroup by db_cluster_identifier;
List of publicly restorable DB cluster snapshots
Discover the segments that include snapshots of your database clusters that can be restored by anyone. This is useful for identifying potential security risks or for planning data recovery strategies.
select db_cluster_snapshot_identifier, engine, snapshot_typefrom aws_neptune_db_cluster_snapshot, jsonb_array_elements(db_cluster_snapshot_attributes) as cluster_snapshotwhere cluster_snapshot -> 'AttributeValues' = '["all"]';
select db_cluster_snapshot_identifier, engine, snapshot_typefrom aws_neptune_db_cluster_snapshotwhere json_extract( db_cluster_snapshot_attributes, '$.AttributeValues' ) = '["all"]';
Schema for aws_neptune_db_cluster_snapshot
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). | |
availability_zones | jsonb | Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in. | |
cluster_create_time | timestamp with time zone | Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC). | |
db_cluster_identifier | text | = | Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from. |
db_cluster_snapshot_arn | text | The Amazon Resource Name (ARN) for the DB cluster snapshot. | |
db_cluster_snapshot_attributes | jsonb | A list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot. | |
db_cluster_snapshot_identifier | text | = | Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot. |
engine | text | Specifies the name of the database engine. | |
engine_version | text | Provides the version of the database engine for this DB cluster snapshot. | |
iam_database_authentication_enabled | boolean | True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. | |
kms_key_id | text | If StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB cluster snapshot. | |
license_model | text | Provides the license model information for this DB cluster snapshot. | |
master_username | text | Not supported by Neptune. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
percent_progress | bigint | Specifies the percentage of the estimated data that has been transferred. | |
port | bigint | Specifies the port that the DB cluster was listening on at the time of the snapshot. | |
region | text | The AWS Region in which the resource is located. | |
snapshot_create_time | timestamp with time zone | Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC). | |
snapshot_type | text | = | Provides the type of the DB cluster snapshot. |
source_db_cluster_snapshot_arn | text | If the DB cluster snapshot was copied from a source DB cluster snapshot, the Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null value. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Specifies the status of this DB cluster snapshot. | |
storage_encrypted | boolean | Specifies whether the DB cluster snapshot is encrypted. | |
storage_type | text | The storage type associated with the DB cluster snapshot. | |
title | text | Title of the resource. | |
vpc_id | text | Provides the VPC ID associated with the DB cluster snapshot. |
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_neptune_db_cluster_snapshot