Create an empty Neptune graph - Neptune Analytics
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Create an empty Neptune graph

To create an empty graph, you first choose the graph type: a provisioned graph or a session in Neptune Graph Sessions. The graph type changes the options that follow it.

  • A provisioned graph takes a memory size in m-NCUs and a replica count.

  • A graph session takes a starting size of 4 or 8 s-NCU. Graph sessions don't support replicas.

Both graph types then take a graph name, network connectivity options, and an optional vector search configuration. You can create a graph with the AWS Management Console, the AWS CLI, or CloudFormation. For help choosing a graph type, see Choosing a graph type: provisioned graphs and Neptune Graph Sessions. For the full console procedure, see Creating a new Neptune Analytics graph using the AWS Management Console.

AWS console
  1. Sign in to the AWS Management Console, and open the Amazon Neptune console at https://eusc-de-east-1.console.amazonaws-eusc.eu/neptune/.

  2. In the upper right corner of the console, choose the AWS Region for the graph. Then, in the navigation pane, choose Graphs in the Analytics section.

  3. Choose Create graph.

  4. Choose the graph type first, because the graph type changes the remaining options:

    • For a provisioned graph, choose Provisioned. Then enter the size in m-NCUs and the replica count. Each replica adds charges equal to the m-NCUs of the graph.

    • For a graph session, choose Session. Then choose a starting size of 4 or 8 s-NCU.

  5. In settings, enter the graph name. In the data source section, choose the empty graph option.

    Image showing the AWS console, with the available options and settings configurations.
  6. You can connect to a Neptune graph from a public endpoint or a private endpoint. Select your network configuration accordingly.

    Note

    If you're creating a private graph endpoint, the following permissions are required:

    • ec2:CreateVpcEndpoint

    • ec2:DescribeAvailabilityZones

    • ec2:DescribeSecurityGroups

    • ec2:DescribeSubnets

    • ec2:DescribeVpcAttribute

    • ec2:DescribeVpcEndpoints

    • ec2:DescribeVpcs

    • ec2:ModifyVpcEndpoint

    • route53:AssociateVPCWithHostedZone

    For more information about required permissions, see Actions defined by Neptune Analytics.

    Image showing the AWS console, with the available options and settings configurations.
  7. (Optional) Choose a vector search configuration for the graph. For more information, see Vector indexing. Then choose Create graph.

AWS CLI

To create a graph with the AWS CLI, run create-graph. The --compute-configuration value sets the graph type.

Create a provisioned graph with a public graph endpoint:

aws neptune-graph create-graph --graph-name 'test-neptune-graph' \ --region us-east-1 --compute-configuration '{"provisionedGraph": {"memory": 128}}' \ --public-connectivity --replica-count 0 --vector-search '{"dimension": 384}'

Create a graph session with a 4 s-NCU starting size and a public graph endpoint. Creating a session takes about 30 seconds:

aws neptune-graph create-graph --graph-name 'test-neptune-session' \ --region us-east-1 --compute-configuration '{"graphSession": {"minMemory": 4}}' \ --public-connectivity --vector-search '{"dimension": 384}'
Note

--compute-configuration is required. The --provisioned-memory option is deprecated. Replace --provisioned-memory 128 with --compute-configuration '{"provisionedGraph": {"memory": 128}}'.

For backward compatibility, graph responses still return provisionedMemory. The field contains memory for a provisioned graph and minMemory for a session. Read computeConfiguration instead.

Create a private graph endpoint:

aws neptune-graph create-private-graph-endpoint --vpc-id vpc-0a9b7a5b15 \ --subnet-ids subnet-06a4b41a6221b subnet-0840a4b327ab77 subnet-0353627ab123 \ --vpc-security-group-ids sg-0ab7abab56ab \ --graph-identifier <graph-id> --region us-east-1

Check the status of graph creation:

aws neptune-graph get-graph --graph-identifier <graph-id>

List all graphs in the default Region:

aws neptune-graph list-graphs
CloudFormation

Instead of using the console to create your Neptune graph, you can use CloudFormation to provision AWS resources by treating infrastructure as code. To help you organize your AWS resources into smaller and more manageable units, you can use the CloudFormation nested stack functionality. For more information, see Creating a stack on the AWS CloudFormation console and working with nested stacks.

CloudFormation is free, but the resources that CloudFormation creates are live. You incur the standard usage fees for these resources until you terminate them. The total charges will be minimal. For information about how you might minimize any charges, see AWS free tier.

To create your resources using the CloudFormation console, complete the following steps:

  1. Create the CloudFormation template.

  2. Configure your resources using CloudFormation.

Note

The following templates create provisioned graphs. For CloudFormation support for graph sessions, see Choosing a graph type: provisioned graphs and Neptune Graph Sessions.

The following sample template will create a Neptune graph with a public endpoint.

AWSTemplateFormatVersion: 2010-09-09 Description: NeptuneGraph Graph Create Demo using CloudFormation Resources: NeptuneGraph: Type: AWS::NeptuneGraph::Graph DeletionPolicy: Delete Properties: DeletionProtection: false GraphName: neptune-graph-demo ProvisionedMemory: 128 ReplicaCount: 1 PublicConnectivity: true Tags: - Key: stage Value: test

The following sample template will create a Neptune graph with a private endpoint.

AWSTemplateFormatVersion: 2010-09-09 Description: NeptuneGraph Graph Create Demo using CloudFormation Resources: NeptuneGraph: Type: AWS::NeptuneGraph::Graph DeletionPolicy: Delete Properties: DeletionProtection: false GraphName: neptune-graph-demo ProvisionedMemory: 128 ReplicaCount: 1 PublicConnectivity: false Tags: - Key: stage Value: test NeptuneGraphPrivateEndpoint: Type: AWS::NeptuneGraph::PrivateGraphEndpoint DeletionPolicy: Delete Properties: GraphIdentifier: NeptuneGraph VpcId: myVpc
Important

You can't change the graph name, VPC, subnet ids and vector search configuration. After starting the graph creation, the graph has a status of Creating until the graph is ready to use. When the status of the graph changes to Available, you can connect to the graph. Depending on the configuration, it can take up to 20 minutes before the new graph is available.