AWSAmazon NeptuneDatabase

aws_neptune_cluster cost estimation

Managed graph database supporting Gremlin, openCypher, and SPARQL. Instance hours ($0.348/hour for db.r5.large) plus storage ($0.10/GB-month) plus I/O ($0.20/M requests). Neptune Serverless offers auto-scaling per-NCU.

Amazon Neptune is the managed graph database for Gremlin (TinkerPop), openCypher (Neo4j-compatible), and SPARQL (RDF/W3C) queries. The aws_neptune_cluster represents the cluster volume; aws_neptune_cluster_instance represents nodes. Pricing is similar to Aurora: instance + storage + I/O.

Standard pricing: - Instance: $0.348/hour for db.r5.large = $254/month per instance - Storage: $0.10/GB-month (shared across instances in cluster) - I/O: $0.20 per 1M requests

A typical 2-instance Neptune cluster with 500 GB storage and 100M IOs/month: - Instances: 2 × $254 = $508 - Storage: 500 × $0.10 = $50 - I/O: 100 × $0.20 = $20 - Total: $578/month

Neptune Serverless (introduced 2022): - $0.1608 per NCU-hour - 1 NCU = 2 GB memory + corresponding compute - Auto-scales from 1 NCU to 256 NCU based on load - Pays only for active NCUs

Neptune Serverless makes Neptune economically viable for development and low-volume production workloads. A workload running 4 NCUs for 12 hours/day = ~$57/month vs ~$254/month minimum for the smallest provisioned instance.

When Neptune wins: - Identity and access graphs (who can access what) - Fraud detection (relationship patterns) - Recommendation engines - Knowledge graphs

When Neptune is wrong: - Tabular data with rare joins (PostgreSQL/MySQL fits better) - Pure document storage (DynamoDB cheaper) - Time-series (Timestream cheaper)

c3x estimates Neptune based on instance count, instance class, and (for Serverless) NCU configuration.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_neptune_cluster" "main" {
  cluster_identifier                   = "graph-db"
  engine                               = "neptune"
  backup_retention_period              = 7
  preferred_backup_window              = "07:00-09:00"
  skip_final_snapshot                  = true
  iam_database_authentication_enabled  = true

  serverless_v2_scaling_configuration {
    min_capacity = 1
    max_capacity = 16
  }
}

resource "aws_neptune_cluster_instance" "main" {
  count              = 2
  identifier         = "graph-db-${count.index}"
  cluster_identifier = aws_neptune_cluster.main.id
  instance_class     = "db.serverless"  # Use Serverless
  engine             = "neptune"
}

Pricing dimensions

What you actually pay for when you provision aws_neptune_cluster.

DimensionUnitWhat's being charged
Provisioned instance hoursper instance-hourStandard instance pricing. Each replica bills separately.
$0.348/hour for db.r5.large
Serverless NCU hoursper NCU-hourAuto-scaled capacity. 1 NCU = 2 GB memory + compute. Min 1 NCU, max 256.
$0.1608/NCU-hour
Storageper GB-monthCluster volume shared across instances. Only paid once.
$0.10/GB-month
I/Oper 1M requestsDatabase I/O operations. Significant for read-heavy graph workloads.
$0.20 per 1M IOs
Backupsper GB-monthBackup storage beyond the retention window.
$0.021/GB-month

Optimization tips

Common ways to reduce aws_neptune_cluster cost without changing the workload.

Use Neptune Serverless for variable workloads

30-60% on variable workloads

Provisioned db.r5.large = $254/month always-on. Serverless at average 2 NCU = $235/month, with auto-scaling up during peaks. For workloads under 50% utilization, Serverless saves 30-60%.

Right-size replica count

$254/month per right-sized replica

Each replica bills its own instance hours. Five replicas across AZs for HA = 5 × $254 = $1,270/month. Many workloads only need 2 replicas for HA. Audit read traffic distribution.

Use cached graph algorithms

Up to 70% on I/O

Pre-computing common graph queries (centrality, communities, paths) at off-hours into materialized data avoids real-time graph traversal billing. Reduces I/O substantially for analytics workloads.

Reserved Instances for stable production

30-50% on commitment

1-year all-upfront RI saves ~30%. 3-year ~50%. Applies only to provisioned instances, not Serverless. For predictable production workloads, RIs are standard practice.

FAQ

When should I use Neptune vs DynamoDB?

Use Neptune when relationships are central to queries (friend-of-friend, transitive reachability, fraud rings, knowledge graphs). DynamoDB is better for key-value lookups, simple queries, and high-throughput transactional workloads. If you're modeling complex many-to-many relationships, Neptune; if simple key access, DynamoDB.

Is Neptune compatible with Neo4j?

Partially. Neptune supports openCypher (Neo4j's query language) with most features. Some Neo4j-specific extensions (procedures, APOC library) aren't available. For pure Cypher queries, migration from Neo4j is mechanical. For procedure-heavy code, may require rewrites.

How does Neptune Serverless work?

Capacity is measured in NCUs (Neptune Capacity Units). The cluster auto-scales NCUs based on actual load between configured min and max. NCUs scale up in ~30 seconds, down after sustained idle. Billing is per-NCU-hour, fractional. Good fit for variable workloads.

What's the cost difference between graph and relational for graph data?

Modeling graphs in PostgreSQL with adjacency lists and recursive CTEs can work for shallow graphs (1-3 hops). Performance degrades quickly past that. Neptune handles deep traversal efficiently. The cost trade-off: Neptune's $254+/month minimum vs ~$60/month for db.t3.medium PostgreSQL. Justified when graph queries are the workload's core.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_neptune_cluster.