Menu
Amazon Neptune
User Guide (API Version 2017-11-29)

Amazon Neptune Quick Start

Preview Release    Amazon Neptune Preview is available only to whitelisted customers. To request access to Neptune, see the information on the Amazon Neptune Preview page.

This section shows you the steps required to quickly get started with Amazon Neptune. For general information about Neptune, see What Is Amazon Neptune?.

Prerequisites

Before you create an Amazon Neptune cluster, you need the following items in the US East (N. Virginia) Region.

  • An Amazon Virtual Private Cloud (Amazon VPC). The default VPC will work. The Neptune console can create a VPC for you when you create a Neptune cluster.

  • A Neptune DB subnet group with at least two subnets, with each subnet in a different Availability Zone. You can create a DB subnet group in the Neptune console at https://yukon.aws.amazon.com/neptune?region=us-east-1.

    Note

    Amazon Neptune is not supported in every Availability Zone. If you receive the console error DB Subnet Group doesn't meet availability zone coverage requirement, try adding subnets in additional Availability Zones to the DB subnet group.

  • An Amazon Elastic Compute Cloud (Amazon EC2) instance in the VPC.

    Important

    Access to the Neptune cluster from outside the VPC is disabled.

  • A security group that allows SSH (port 22) access to the Amazon EC2 instance.

  • A security group that allows TCP access to the Neptune port (the default is 8182) from the Amazon EC2 IP or its security group.

    Note

    This can be one single security group.

  • An AWS Identity and Access Management (IAM) user with AmazonRDSFullAccess permissions. These permissions are required to use the Neptune Preview console and create a Neptune cluster. For information about adding these permissions, see AWS Managed (Predefined) Policies.

  • (Loading only) An Amazon Simple Storage Service (Amazon S3) bucket in the US East (N. Virginia) Region.

  • (Loading only) An Amazon S3 VPC endpoint. For more information see, Amazon S3 VPC Endpoint.

For detailed instructions and information about creating these items, see Getting Started with Neptune.

Creating a Neptune Cluster

  1. Sign in to the AWS Management Console, and open the Amazon Neptune console at https://yukon.aws.amazon.com/neptune?region=us-east-1.

  2. Choose Launch DB Instance in the upper-right corner.

  3. In the settings for the instance, use the VPC and security groups from the previous section.

  4. Launch the instance, and note the Cluster endpoint value.

For detailed instructions and information about creating an instance, see Launching a Neptune DB Cluster.

Accessing the Neptune Graph

  1. Connect to your Amazon EC2 instance via SSH.

  2. Query the endpoint for either Gremlin or SPARQL.

    For Gremlin:

    To query the Gremlin graph, type the following command, replacing your-neptune-endpoint with the Cluster endpoint from the previous section:

    curl -X POST -d '{"gremlin":"g.V()"}' http://your-neptune-endpoint:8182/gremlin

    The graph is empty, so the result value has no data. The response looks like the following:

    {"requestId":"43aae48d-5807-40e7-87bd-c92c2dfd99e9","status":{"message":"","code":200,"attributes":{}},"result":{"data":[],"meta":{}}}

    For detailed information about connecting to the Gremlin endpoint of the Neptune graph, see Accessing the Neptune Graph with Gremlin.

    For detailed information about using the Gremlin Console to connect to the Neptune graph, see Using the Gremlin Console to Connect to a Neptune DB Instance .

    For SPARQL:

    To query the SPARQL endpoint, type the following command, replacing your-neptune-endpoint with the Cluster endpoint from the previous section:

    curl -G http://your-neptune-endpoint:8182/sparql --data-urlencode 'query=select ?s ?p ?o where {?s ?p ?o}'

    The graph is empty, so the result value has no data. The response looks like the following.

    <?xml version='1.0' encoding='UTF-8'?> <sparql xmlns='http://www.w3.org/2005/sparql-results#'> <head> <variable name='s'/> <variable name='p'/> <variable name='o'/> </head> <results> </results> </sparql>

    For detailed information about connecting to the SPARQL endpoint of the Neptune graph, see Accessing the Neptune Graph with SPARQL.

    For detailed information about using the RDF4J Workbench to connect to the Neptune graph, see Use RDF4J Workbench to Connect to a Neptune DB Instance .

For detailed information about connecting to the Neptune graph, see Accessing a Neptune Graph.

For general information about Neptune, see What Is Amazon Neptune?.

For information about loading data into Neptune, see Loading Data into Neptune.