Skip to content

AWS.Neptune reference

Source: src/AWS/Neptune/ApplyPendingMaintenanceAction.ts

Runtime binding for the ApplyPendingMaintenanceAction operation (IAM action rds:ApplyPendingMaintenanceAction).

Opts a Neptune resource (by ARN) into a pending maintenance action — e.g. apply an engine patch during the next maintenance window, or immediately. Provide the implementation with Effect.provide(AWS.Neptune.ApplyPendingMaintenanceActionHttp).

ApplyPendingMaintenanceAction: Maintenance

Section titled “ApplyPendingMaintenanceAction: Maintenance”
const applyPendingMaintenanceAction =
yield* AWS.Neptune.ApplyPendingMaintenanceAction();
yield* applyPendingMaintenanceAction({
ResourceIdentifier: clusterArn,
ApplyAction: "system-update",
OptInType: "next-maintenance",
});

Source: src/AWS/Neptune/CopyDBClusterSnapshot.ts

Runtime binding for the CopyDBClusterSnapshot operation (IAM action rds:CopyDBClusterSnapshot).

Copies a Neptune cluster snapshot — e.g. archive a nightly snapshot under a retention prefix, or copy it for cross-region disaster recovery. Provide the implementation with Effect.provide(AWS.Neptune.CopyDBClusterSnapshotHttp).

const copyDBClusterSnapshot = yield* AWS.Neptune.CopyDBClusterSnapshot();
yield* copyDBClusterSnapshot({
SourceDBClusterSnapshotIdentifier: snapshotId,
TargetDBClusterSnapshotIdentifier: `${snapshotId}-archive`,
});

Source: src/AWS/Neptune/CreateDBClusterSnapshot.ts

Runtime binding for the CreateDBClusterSnapshot operation (IAM actions rds:CreateDBClusterSnapshot + rds:AddTagsToResource).

Takes a manual snapshot of the bound DBCluster — e.g. a pre-migration backup function or a scheduled snapshot-rotation job. The cluster identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.CreateDBClusterSnapshotHttp).

CreateDBClusterSnapshot: Managing Snapshots

Section titled “CreateDBClusterSnapshot: Managing Snapshots”
// init — bind the operation to the cluster
const createDBClusterSnapshot =
yield* AWS.Neptune.CreateDBClusterSnapshot(cluster);
// runtime
yield* createDBClusterSnapshot({
DBClusterSnapshotIdentifier: `pre-migration-${runId}`,
});

Source: src/AWS/Neptune/DBCluster.ts

An Amazon Neptune graph database cluster.

DBCluster owns the writer and reader endpoints and cluster-wide networking; compute is added via DBInstance. Neptune serves Gremlin, openCypher, and SPARQL over the cluster endpoint (default port 8182) and is reachable only from inside the VPC. Provisioning a cluster plus its first instance takes ~10 minutes.

Mutable fields are reconciled in place against the observed cloud state; immutable fields (engine, dbSubnetGroupName, storageEncrypted, kmsKeyId, globalClusterIdentifier, availabilityZones) force a replacement.

const cluster = yield* DBCluster("Graph", {
dbSubnetGroupName: subnetGroup.dbSubnetGroupName,
vpcSecurityGroupIds: [sg.groupId],
enableIAMDatabaseAuthentication: true,
backupRetentionPeriod: "1 day",
deletionProtection: false,
});
const cluster = yield* DBCluster("Graph", {
dbSubnetGroupName: subnetGroup.dbSubnetGroupName,
serverlessV2ScalingConfiguration: {
minCapacity: 1,
maxCapacity: 2.5,
},
});

Source: src/AWS/Neptune/DBClusterParameterGroup.ts

An Amazon Neptune DB cluster parameter group — a named set of engine configuration parameters (query timeout, audit logging, …) that can be attached to one or more Neptune DBClusters.

DBClusterParameterGroup: Creating a Parameter Group

Section titled “DBClusterParameterGroup: Creating a Parameter Group”
const params = yield* DBClusterParameterGroup("Params", {
family: "neptune1.4",
parameters: {
neptune_query_timeout: "120000",
},
});

DBClusterParameterGroup: Attaching to a Cluster

Section titled “DBClusterParameterGroup: Attaching to a Cluster”
const cluster = yield* DBCluster("Graph", {
dbSubnetGroupName: subnetGroup.dbSubnetGroupName,
dbClusterParameterGroupName: params.dbClusterParameterGroupName,
});

Source: src/AWS/Neptune/DBInstance.ts

An Amazon Neptune instance — a compute member of a Neptune DBCluster. Storage, backup, and endpoints are managed at the cluster level; the instance contributes CPU/RAM and can serve as a writer or reader. Provisioning takes several minutes.

Mutable fields (dbInstanceClass, promotionTier, maintenance window) are reconciled in place; immutable fields (engine, dbClusterIdentifier, availabilityZone) force a replacement.

A Neptune writer instance

const writer = yield* DBInstance("Writer", {
dbClusterIdentifier: cluster.dbClusterIdentifier,
dbInstanceClass: "db.t4g.medium",
});

A serverless instance

const writer = yield* DBInstance("Writer", {
dbClusterIdentifier: cluster.dbClusterIdentifier,
dbInstanceClass: "db.serverless",
});

Source: src/AWS/Neptune/DBParameterGroup.ts

An Amazon Neptune DB (instance-level) parameter group — a named set of engine configuration parameters applied to individual Neptune DBInstances via dbParameterGroupName (cluster-wide settings live in a DBClusterParameterGroup instead).

DBParameterGroup: Creating a Parameter Group

Section titled “DBParameterGroup: Creating a Parameter Group”
const params = yield* DBParameterGroup("InstanceParams", {
family: "neptune1.4",
parameters: {
neptune_query_timeout: "120000",
},
});

DBParameterGroup: Attaching to an Instance

Section titled “DBParameterGroup: Attaching to an Instance”
const writer = yield* DBInstance("Writer", {
dbClusterIdentifier: cluster.dbClusterIdentifier,
dbInstanceClass: "db.serverless",
dbParameterGroupName: params.dbParameterGroupName,
});

Source: src/AWS/Neptune/DBSubnetGroup.ts

An Amazon Neptune DB subnet group — the set of VPC subnets a Neptune cluster and its instances are placed into. Neptune is VPC-only, so a subnet group spanning at least two Availability Zones is required before a cluster can be created.

const subnetGroup = yield* DBSubnetGroup("NeptuneSubnets", {
subnetIds: [subnetA.subnetId, subnetB.subnetId],
});

Source: src/AWS/Neptune/DeleteDBClusterSnapshot.ts

Runtime binding for the DeleteDBClusterSnapshot operation (IAM action rds:DeleteDBClusterSnapshot).

Deletes a manual Neptune cluster snapshot — the pruning half of a snapshot-rotation function. Provide the implementation with Effect.provide(AWS.Neptune.DeleteDBClusterSnapshotHttp).

DeleteDBClusterSnapshot: Managing Snapshots

Section titled “DeleteDBClusterSnapshot: Managing Snapshots”
const deleteDBClusterSnapshot = yield* AWS.Neptune.DeleteDBClusterSnapshot();
yield* deleteDBClusterSnapshot({
DBClusterSnapshotIdentifier: oldSnapshotId,
});

Source: src/AWS/Neptune/DescribeDBClusterEndpoints.ts

Runtime binding for the DescribeDBClusterEndpoints operation (IAM action rds:DescribeDBClusterEndpoints).

Lists a Neptune cluster’s endpoints — the writer, reader, and any custom endpoints — so a function can discover the host names to route Gremlin or openCypher traffic to. Provide the implementation with Effect.provide(AWS.Neptune.DescribeDBClusterEndpointsHttp).

DescribeDBClusterEndpoints: Monitoring Clusters

Section titled “DescribeDBClusterEndpoints: Monitoring Clusters”
const describeDBClusterEndpoints =
yield* AWS.Neptune.DescribeDBClusterEndpoints();
const page = yield* describeDBClusterEndpoints({
DBClusterIdentifier: clusterId,
});
const endpoints = page.DBClusterEndpoints?.map((e) => e.Endpoint);

Source: src/AWS/Neptune/DescribeDBClusters.ts

Runtime binding for the DescribeDBClusters operation (IAM action rds:DescribeDBClusters).

Lists the account’s Neptune clusters (or one cluster by identifier) — status, endpoints, members, engine versions — for health checks and cluster discovery. Provide the implementation with Effect.provide(AWS.Neptune.DescribeDBClustersHttp).

const describeDBClusters = yield* AWS.Neptune.DescribeDBClusters();
const page = yield* describeDBClusters({
DBClusterIdentifier: clusterId,
});
const status = page.DBClusters?.[0]?.Status;

Source: src/AWS/Neptune/DescribeDBClusterSnapshots.ts

Runtime binding for the DescribeDBClusterSnapshots operation (IAM action rds:DescribeDBClusterSnapshots).

Lists the account’s Neptune cluster snapshots (manual and automated) — for backup verification and restore tooling. Provide the implementation with Effect.provide(AWS.Neptune.DescribeDBClusterSnapshotsHttp).

DescribeDBClusterSnapshots: Managing Snapshots

Section titled “DescribeDBClusterSnapshots: Managing Snapshots”
const describeDBClusterSnapshots =
yield* AWS.Neptune.DescribeDBClusterSnapshots();
const page = yield* describeDBClusterSnapshots({
DBClusterIdentifier: clusterId,
});
const count = page.DBClusterSnapshots?.length;

Source: src/AWS/Neptune/DescribeDBInstances.ts

Runtime binding for the DescribeDBInstances operation (IAM action rds:DescribeDBInstances).

Lists the account’s Neptune instances (or one instance by identifier) — status, endpoint, instance class, cluster membership — for health checks and reader discovery. Provide the implementation with Effect.provide(AWS.Neptune.DescribeDBInstancesHttp).

const describeDBInstances = yield* AWS.Neptune.DescribeDBInstances();
const page = yield* describeDBInstances({
DBInstanceIdentifier: instanceId,
});
const status = page.DBInstances?.[0]?.DBInstanceStatus;

Source: src/AWS/Neptune/DescribeEvents.ts

Runtime binding for the DescribeEvents operation (IAM action rds:DescribeEvents).

Lists recent events (failovers, maintenance, snapshots, parameter changes) for the account’s Neptune clusters and instances — the audit trail for operational tooling. Provide the implementation with Effect.provide(AWS.Neptune.DescribeEventsHttp).

const describeEvents = yield* AWS.Neptune.DescribeEvents();
const page = yield* describeEvents({
SourceIdentifier: clusterId,
SourceType: "db-cluster",
});
const messages = page.Events?.map((e) => e.Message);

Source: src/AWS/Neptune/DescribePendingMaintenanceActions.ts

Runtime binding for the DescribePendingMaintenanceActions operation (IAM action rds:DescribePendingMaintenanceActions).

Lists pending maintenance actions (engine patches, system updates) for the account’s Neptune resources — pair with ApplyPendingMaintenanceAction for maintenance automation. Provide the implementation with Effect.provide(AWS.Neptune.DescribePendingMaintenanceActionsHttp).

DescribePendingMaintenanceActions: Maintenance

Section titled “DescribePendingMaintenanceActions: Maintenance”
const describePendingMaintenanceActions =
yield* AWS.Neptune.DescribePendingMaintenanceActions();
const page = yield* describePendingMaintenanceActions();
const pending = page.PendingMaintenanceActions ?? [];

Source: src/AWS/Neptune/FailoverDBCluster.ts

Runtime binding for the FailoverDBCluster operation (IAM action rds:FailoverDBCluster).

Forces a failover of the bound DBCluster — one of the read replicas is promoted to primary — for resilience testing or to move the writer to a specific instance. The cluster identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.FailoverDBClusterHttp).

// init — bind the operation to the cluster
const failoverDBCluster = yield* AWS.Neptune.FailoverDBCluster(cluster);
// runtime — promote a specific replica
yield* failoverDBCluster({
TargetDBInstanceIdentifier: replicaId,
});

Source: src/AWS/Neptune/RebootDBInstance.ts

Runtime binding for the RebootDBInstance operation (IAM action rds:RebootDBInstance).

Reboots the bound DBInstance — e.g. to apply a static parameter change from an ops function. The instance identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.RebootDBInstanceHttp).

// init — bind the operation to the instance
const rebootDBInstance = yield* AWS.Neptune.RebootDBInstance(instance);
// runtime
yield* rebootDBInstance();

Source: src/AWS/Neptune/StartDBCluster.ts

Runtime binding for the StartDBCluster operation (IAM action rds:StartDBCluster).

Starts the bound DBCluster after it was stopped — e.g. an ops function that wakes a development cluster on a schedule. The cluster identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.StartDBClusterHttp).

// init — bind the operation to the cluster
const startDBCluster = yield* AWS.Neptune.StartDBCluster(cluster);
// runtime
yield* startDBCluster();

Source: src/AWS/Neptune/StopDBCluster.ts

Runtime binding for the StopDBCluster operation (IAM action rds:StopDBCluster).

Stops the bound DBCluster (compute pauses, storage persists) — e.g. an ops function that parks a development cluster overnight to save cost. The cluster identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.StopDBClusterHttp).

// init — bind the operation to the cluster
const stopDBCluster = yield* AWS.Neptune.StopDBCluster(cluster);
// runtime
yield* stopDBCluster();