CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-pulumi--aws

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources with infrastructure-as-code.

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

neptune.mddocs/database/

Neptune - Graph Database

Amazon Neptune is a fast, reliable graph database service for connected data.

Common Tasks

Create a Neptune cluster

const cluster = new aws.neptune.Cluster("graph", {
    engine: "neptune",
    backupRetentionPeriod: 7,
    iamDatabaseAuthenticationEnabled: true,
    storageEncrypted: true,
});

Create a Neptune cluster with instances

const cluster = new aws.neptune.Cluster("graph", {
    engine: "neptune",
    clusterIdentifier: "graph-cluster",
    backupRetentionPeriod: 7,
    storageEncrypted: true,
});

const instance = new aws.neptune.ClusterInstance("graph-instance", {
    clusterIdentifier: cluster.id,
    engine: "neptune",
    instanceClass: "db.r5.large",
});

Create a global database

const globalCluster = new aws.neptune.GlobalCluster("global-graph", {
    globalClusterIdentifier: "global-graph",
    engine: "neptune",
    engineVersion: "1.2.0.0",
});

const primaryCluster = new aws.neptune.Cluster("primary", {
    engine: "neptune",
    globalClusterIdentifier: globalCluster.id,
    clusterIdentifier: "primary-cluster",
});

Core Resources

Cluster

Neptune clusters for graph database workloads supporting Property Graph (Apache TinkerPop Gremlin) and RDF (SPARQL).

class Cluster extends pulumi.CustomResource {
    constructor(name: string, args: ClusterArgs, opts?: pulumi.CustomResourceOptions);

    readonly arn: pulumi.Output<string>;
    readonly endpoint: pulumi.Output<string>;
    readonly readerEndpoint: pulumi.Output<string>;
    readonly clusterResourceId: pulumi.Output<string>;
}

interface ClusterArgs {
    clusterIdentifier?: pulumi.Input<string>;
    engine?: pulumi.Input<"neptune">;
    engineVersion?: pulumi.Input<string>;
    backupRetentionPeriod?: pulumi.Input<number>;
    preferredBackupWindow?: pulumi.Input<string>;
    storageEncrypted?: pulumi.Input<boolean>;
    iamDatabaseAuthenticationEnabled?: pulumi.Input<boolean>;
    neptuneSubnetGroupName?: pulumi.Input<string>;
    vpcSecurityGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Example: Production Neptune cluster

import * as aws from "@pulumi/aws";

const subnetGroup = new aws.neptune.SubnetGroup("neptune-subnet", {
    subnetIds: [privateSubnet1.id, privateSubnet2.id],
    tags: { Name: "neptune-subnet-group" },
});

const cluster = new aws.neptune.Cluster("graph-db", {
    clusterIdentifier: "graph-cluster",
    engine: "neptune",
    engineVersion: "1.2.1.0",
    backupRetentionPeriod: 14,
    preferredBackupWindow: "03:00-04:00",
    storageEncrypted: true,
    iamDatabaseAuthenticationEnabled: true,
    neptuneSubnetGroupName: subnetGroup.name,
    vpcSecurityGroupIds: [neptuneSecurityGroup.id],
    enableCloudwatchLogsExports: ["audit"],
    tags: { Environment: "production" },
});

// Add instances to the cluster
const primaryInstance = new aws.neptune.ClusterInstance("primary", {
    clusterIdentifier: cluster.id,
    engine: "neptune",
    instanceClass: "db.r5.xlarge",
    applyImmediately: true,
});

const replicaInstance = new aws.neptune.ClusterInstance("replica", {
    clusterIdentifier: cluster.id,
    engine: "neptune",
    instanceClass: "db.r5.xlarge",
    applyImmediately: true,
});

export const writeEndpoint = cluster.endpoint;
export const readEndpoint = cluster.readerEndpoint;
export const clusterArn = cluster.arn;

ClusterInstance

Individual instances within a Neptune cluster.

class ClusterInstance extends pulumi.CustomResource {
    constructor(name: string, args: ClusterInstanceArgs, opts?: pulumi.CustomResourceOptions);

    readonly endpoint: pulumi.Output<string>;
    readonly arn: pulumi.Output<string>;
}

interface ClusterInstanceArgs {
    clusterIdentifier: pulumi.Input<string>;
    engine?: pulumi.Input<"neptune">;
    instanceClass: pulumi.Input<string>;
    availabilityZone?: pulumi.Input<string>;
    preferredMaintenanceWindow?: pulumi.Input<string>;
    tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
}

Related Services

  • VPC - Configure network isolation for Neptune clusters
  • IAM - Enable IAM database authentication
  • Lambda - Query graph data from serverless functions
  • CloudWatch - Monitor cluster metrics and audit logs
  • S3 - Bulk load data into Neptune from S3
  • SageMaker - Machine learning on graph data

For complete Neptune API, see All Services.

Install with Tessl CLI

npx tessl i tessl/npm-pulumi--aws

docs

index.md

quickstart.md

README.md

tile.json