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_idfrom aws_neptune_db_clusterwhere kms_key_id is null;
select db_cluster_identifier, allocated_storage, kms_key_idfrom aws_neptune_db_clusterwhere 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_periodfrom aws_neptune_db_clusterwhere backup_retention_period > 7;
select db_cluster_identifier, backup_retention_periodfrom aws_neptune_db_clusterwhere 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_countfrom aws_neptune_db_cluster;
select db_cluster_identifier, json_array_length(availability_zones) as availability_zones_countfrom 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_tierfrom 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_tierfrom aws_neptune_db_cluster, json_each(db_cluster_members) as member;
Schema for aws_neptune_db_cluster
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 | AllocatedStorage always returns 1, because Neptune DB cluster storage size is not fixed, but instead automatically adjusts as needed. | |
arn | text | The Amazon Resource Name (ARN) for the DB cluster. | |
associated_roles | jsonb | Provides a list of the Amazon Identity and Access Management (IAM) roles. | |
automatic_restart_time | timestamp with time zone | Time at which the DB cluster will be automatically restarted. | |
availability_zones | jsonb | Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in. | |
backup_retention_period | bigint | Specifies the number of days for which automatic DB snapshots are retained. | |
clone_group_id | text | Identifies the clone group to which the DB cluster is associated. | |
cluster_create_time | timestamp with time zone | Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC). | |
copy_tags_to_snapshot | boolean | If set to true, tags are copied to any snapshot of the DB cluster that is created. | |
cross_account_clone | boolean | If set to true, the DB cluster can be cloned across accounts. | |
database_name | text | Contains the name of the initial database of this DB cluster that was provided. | |
db_cluster_identifier | text | = | Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster. |
db_cluster_members | jsonb | Provides the list of instances that make up the DB cluster. | |
db_cluster_parameter_group | text | Specifies the name of the DB cluster parameter group for the DB cluster. | |
db_cluster_resource_id | text | The Amazon Region-unique, immutable identifier for the DB cluster. | |
db_subnet_group | text | Specifies information on the subnet group associated with the DB cluster. | |
deletion_protection | boolean | Indicates whether or not the DB cluster has deletion protection enabled. | |
earliest_restorable_time | timestamp with time zone | Specifies the earliest time to which a database can be restored with point-in-time restore. | |
enabled_cloudwatch_logs_exports | jsonb | A list of log types that this DB cluster is configured to export to CloudWatch Logs. | |
endpoint | text | Specifies the connection endpoint for the primary instance of the DB cluster. | |
engine | text | Provides the name of the database engine to be used for this DB cluster. | |
engine_version | text | Indicates the database engine version. | |
global_cluster_identifier | text | Contains a user-supplied global database cluster identifier. This identifier is the unique key that identifies a global database. | |
hosted_zone_id | text | Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. | |
iam_database_authentication_enabled | boolean | True if mapping of Amazon Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. | |
io_optimized_next_allowed_modification_time | timestamp with time zone | The next time you can modify the DB cluster to use the iopt1 storage type. | |
kms_key_id | text | If StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB cluster. | |
latest_restorable_time | timestamp with time zone | Specifies the latest time to which a database can be restored with point-in-time restore. | |
multi_az | boolean | Specifies whether the DB cluster has instances in multiple Availability Zones. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
pending_modified_values | jsonb | This data type is used as a response element in the ModifyDBCluster operation and contains changes that will be applied during the next maintenance window. | |
percent_progress | text | Specifies the progress of the operation as a percentage. | |
port | bigint | Specifies the port that the database engine is listening on. | |
preferred_backup_window | text | Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod. | |
preferred_maintenance_window | text | Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC). | |
read_replica_identifiers | jsonb | Contains one or more identifiers of the Read Replicas associated with this DB cluster. | |
reader_endpoint | text | The reader endpoint for the DB cluster. | |
region | text | The AWS Region in which the resource is located. | |
serverless_v2_scaling_configuration | jsonb | Shows the scaling configuration for a Neptune Serverless DB cluster. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Specifies the current state of this DB cluster. | |
storage_encrypted | boolean | Specifies whether the DB cluster is encrypted. | |
storage_type | text | The storage type associated with the DB cluster. | |
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags assigned to the resource. | |
title | text | Title of the resource. | |
vpc_security_groups | jsonb | Provides 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