Accessing a Neptune graph with Gremlin - Amazon Neptune

Accessing a Neptune graph with Gremlin

Amazon Neptune is compatible with Apache TinkerPop and Gremlin. This means that you can connect to a Neptune DB instance and use the Gremlin traversal language to query the graph (see The Graph in the Apache TinkerPop documentation). For differences in the Neptune implementation of Gremlin, see Gremlin standards compliance.

A traversal in Gremlin is a series of chained steps. It starts at a vertex (or edge). It walks the graph by following the outgoing edges of each vertex and then the outgoing edges of those vertices. Each step is an operation in the traversal. For more information, see The Traversal in the TinkerPop documentation.

Different Neptune engine versions support different Gremlin versions. Check the engine release page of the Neptune version you are running to determine which Gremlin release it supports or consult the following table which lists the earliest and latest versions of TinkerPop supported by different Neptune engine versions:

Neptune Engine Version Minimum TinkerPop Version Maximum TinkerPop Version

1.3.2.0 <= current

3.7.1

3.7.3

1.3.1.0

3.6.2

3.6.5

1.3.0.0

3.6.2

3.6.4

1.2.1.0 <= 1.2.1.2

3.6.2

3.6.2

1.1.1.0 <= 1.2.0.2

3.5.5

3.5.6

1.1.0.0 and older

(deprecated)

(deprecated)

TinkerPop clients are usually backwards compatible within a series (3.6.x, for example, or 3.7.x) and while they can often work across those boundaries, the table above recommends the version combinations to use for the best possible experience and compatibility. Unless otherwise advised, it is generally best to adhere to these guidelines and upgrade client applications to match the version of TinkerPop you are using.

When upgrading TinkerPop versions it is always important to refer to TinkerPop's upgrade documentation which will help you identify new features you can take advantage of, but also issues you may need to be aware of as you approach your upgrade. You should typically expect existing queries and features to work after upgrade unless something in particular is called out as an issue to consider. Finally, it is important to note that should a version you upgrade to have a new feature, you may not be able to use it if it is from a version later than what Neptune supports.

There are Gremlin language variants and support for Gremlin access in various programming languages. For more information, see On Gremlin Language Variants in the TinkerPop documentation.

This documentation describes how to access Neptune with the following variants and programming languages:

As discussed in Encrypting connections to your Amazon Neptune database with SSL/HTTPS, you must use Transport Layer Security/Secure Sockets Layer (TLS/SSL) when connecting to Neptune in all AWS Regions.

Before you begin, you must have the following:

  • A Neptune DB instance. For information about creating a Neptune DB instance, see Creating an Amazon Neptune cluster.

  • An Amazon EC2 instance in the same virtual private cloud (VPC) as your Neptune DB instance.

For more information about loading data into Neptune, including prerequisites, loading formats, and load parameters, see Loading data into Amazon Neptune.