steampipe plugin install aws

Table: aws_neptune_db_cluster - Query Amazon Neptune DB Clusters using SQL

Amazon Neptune DB Clusters are a scalable and reliable graph database service that is optimized for storing billions of relationships and querying the graph with milliseconds latency. Neptune supports popular graph models Property Graph and W3C's RDF, and their respective query languages Apache TinkerPop Gremlin and SPARQL. It is designed to offer fast and reliable access to your graph applications, allowing you to build and run applications that work with highly connected datasets.

Table Usage Guide

The aws_neptune_db_cluster table in Steampipe provides you with information about DB clusters within Amazon Neptune. This table allows you, as a DevOps engineer, to query DB cluster-specific details, including configuration, status, and associated metadata. You can utilize this table to gather insights on DB clusters, such as their availability, security settings, backup policies, and more. The schema outlines the various attributes of the DB cluster for you, including the cluster identifier, creation time, enabled cloudwatch logs exports, and associated tags.

Important Notes

  • This table only returns Neptune DB clusters for you, not RDS or DocumentDB DB clusters.

Examples

List of DB clusters which are not encrypted

Discover the segments of your database clusters that are not encrypted. This query is useful to identify potential security risks and ensure compliance with data protection standards.

select
db_cluster_identifier,
allocated_storage,
kms_key_id
from
aws_neptune_db_cluster
where
kms_key_id is null;
select
db_cluster_identifier,
allocated_storage,
kms_key_id
from
aws_neptune_db_cluster
where
kms_key_id is null;

List of DB clusters where backup retention period is greater than 7 days

Identify instances where database clusters have a backup retention period exceeding a week. This could be useful for ensuring data safety and compliance with company policies or regulations.

select
db_cluster_identifier,
backup_retention_period
from
aws_neptune_db_cluster
where
backup_retention_period > 7;
select
db_cluster_identifier,
backup_retention_period
from
aws_neptune_db_cluster
where
backup_retention_period > 7;

Avalability zone count for each db instance

Explore which database clusters have varying availability zone counts, allowing you to assess the distribution and redundancy of your databases for better resource management and disaster recovery planning.

select
db_cluster_identifier,
jsonb_array_length(availability_zones) availability_zones_count
from
aws_neptune_db_cluster;
select
db_cluster_identifier,
json_array_length(availability_zones) as availability_zones_count
from
aws_neptune_db_cluster;

DB cluster Members info

Explore the configuration and status of various components within your AWS Neptune database clusters. This query will help you identify which instances are cluster writers and their respective promotion tiers, providing valuable insights for managing and optimizing your database operations.

select
db_cluster_identifier,
member ->> 'DBClusterParameterGroupStatus' as db_cluster_parameter_group_status,
member ->> 'DBInstanceIdentifier' as db_instance_identifier,
member ->> 'IsClusterWriter' as is_cluster_writer,
member ->> 'PromotionTier' as promotion_tier
from
aws_neptune_db_cluster
cross join jsonb_array_elements(db_cluster_members) as member;
select
db_cluster_identifier,
json_extract(member.value, '$.DBClusterParameterGroupStatus') as db_cluster_parameter_group_status,
json_extract(member.value, '$.DBInstanceIdentifier') as db_instance_identifier,
json_extract(member.value, '$.IsClusterWriter') as is_cluster_writer,
json_extract(member.value, '$.PromotionTier') as promotion_tier
from
aws_neptune_db_cluster,
json_each(db_cluster_members) as member;

Schema for aws_neptune_db_cluster

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_storagebigintAllocatedStorage always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed.
arntextThe Amazon Resource Name (ARN) for the DB cluster.
associated_rolesjsonbProvides a list of the Amazon Identity and Access Management (IAM) roles.
automatic_restart_timetimestamp with time zoneTime at which the DB cluster will be automatically restarted.
availability_zonesjsonbProvides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
backup_retention_periodbigintSpecifies the number of days for which automatic DB snapshots are retained.
clone_group_idtextIdentifies the clone group to which the DB cluster is associated.
cluster_create_timetimestamp with time zoneSpecifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
copy_tags_to_snapshotbooleanIf set to true, tags are copied to any snapshot of the DB cluster that is created.
cross_account_clonebooleanIf set to true, the DB cluster can be cloned across accounts.
database_nametextContains the name of the initial database of this DB cluster that was provided.
db_cluster_identifiertext=Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
db_cluster_membersjsonbProvides the list of instances that make up the DB cluster.
db_cluster_parameter_grouptextSpecifies the name of the DB cluster parameter group for the DB cluster.
db_cluster_resource_idtextThe Amazon Region-unique, immutable identifier for the DB cluster.
db_subnet_grouptextSpecifies information on the subnet group associated with the DB cluster.
deletion_protectionbooleanIndicates whether or not the DB cluster has deletion protection enabled.
earliest_restorable_timetimestamp with time zoneSpecifies the earliest time to which a database can be restored with point-in-time restore.
enabled_cloudwatch_logs_exportsjsonbA list of log types that this DB cluster is configured to export to CloudWatch Logs.
endpointtextSpecifies the connection endpoint for the primary instance of the DB cluster.
enginetextProvides the name of the database engine to be used for this DB cluster.
engine_versiontextIndicates the database engine version.
hosted_zone_idtextSpecifies the ID that Amazon Route 53 assigns when you create a hosted zone.
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.
latest_restorable_timetimestamp with time zoneSpecifies the latest time to which a database can be restored with point-in-time restore.
multi_azbooleanSpecifies whether the DB cluster has instances in multiple Availability Zones.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
percent_progresstextSpecifies the progress of the operation as a percentage.
portbigintSpecifies the port that the database engine is listening on.
preferred_backup_windowtextSpecifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
preferred_maintenance_windowtextSpecifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
read_replica_identifiersjsonbContains one or more identifiers of the Read Replicas associated with this DB cluster.
reader_endpointtextThe reader endpoint for the DB cluster.
regiontextThe AWS Region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextSpecifies the current state of this DB cluster.
storage_encryptedbooleanSpecifies whether the DB cluster is encrypted.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags assigned to the resource.
titletextTitle of the resource.
vpc_security_groupsjsonbProvides a list of VPC security groups that the DB cluster belongs to.

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