steampipe plugin install aws

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_encrypted
from
aws_neptune_db_cluster_snapshot
where
not storage_encrypted;
select
db_cluster_snapshot_identifier,
snapshot_type,
storage_encrypted
from
aws_neptune_db_cluster_snapshot
where
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_model
from
aws_neptune_db_cluster_snapshot;
select
db_cluster_snapshot_identifier,
cluster_create_time,
engine,
engine_version,
license_model
from
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_count
from
aws_neptune_db_cluster_snapshot
group by
db_cluster_identifier;
select
db_cluster_identifier,
count(db_cluster_snapshot_identifier) snapshot_count
from
aws_neptune_db_cluster_snapshot
group 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_type
from
aws_neptune_db_cluster_snapshot,
jsonb_array_elements(db_cluster_snapshot_attributes) as cluster_snapshot
where
cluster_snapshot -> 'AttributeValues' = '["all"]';
select
db_cluster_snapshot_identifier,
engine,
snapshot_type
from
aws_neptune_db_cluster_snapshot
where
json_extract(
db_cluster_snapshot_attributes,
'$.AttributeValues'
) = '["all"]';

Schema for aws_neptune_db_cluster_snapshot

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.
allocated_storagebigintSpecifies the allocated storage size in gibibytes (GiB).
availability_zonesjsonbProvides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
cluster_create_timetimestamp with time zoneSpecifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
db_cluster_identifiertext=Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
db_cluster_snapshot_arntextThe Amazon Resource Name (ARN) for the DB cluster snapshot.
db_cluster_snapshot_attributesjsonbA list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
db_cluster_snapshot_identifiertext=Specifies the identifier for a DB cluster snapshot. Must match the identifier of an existing snapshot.
enginetextSpecifies the name of the database engine.
engine_versiontextProvides the version of the database engine for this DB cluster snapshot.
iam_database_authentication_enabledbooleanTrue if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
kms_key_idtextIf StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB cluster snapshot.
license_modeltextProvides the license model information for this DB cluster snapshot.
master_usernametextNot supported by Neptune.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
percent_progressbigintSpecifies the percentage of the estimated data that has been transferred.
portbigintSpecifies the port that the DB cluster was listening on at the time of the snapshot.
regiontextThe AWS Region in which the resource is located.
snapshot_create_timetimestamp with time zoneProvides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
snapshot_typetext=Provides the type of the DB cluster snapshot.
source_db_cluster_snapshot_arntextIf 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_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextSpecifies the status of this DB cluster snapshot.
storage_encryptedbooleanSpecifies whether the DB cluster snapshot is encrypted.
titletextTitle of the resource.
vpc_idtextProvides 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