View a markdown version of this page

Accessing graph data in Amazon Neptune - Amazon Neptune

Accessing graph data in Amazon Neptune

You can interact with a Amazon Neptune DB cluster after establishing network connectivity. If you have not set up access to your cluster yet, see Connect to a cluster. The following sections describe the tools and query languages you can use to load data, run queries, and manage your graph.

Tools for accessing Neptune

Neptune supports several tools for submitting queries and managing your graph data:

  • AWS CLI   –   Use the aws neptunedata commands to run Gremlin and openCypher queries, check engine status, manage bulk loads, and more. For more information, see neptunedata in the AWS CLI Command Reference.

  • AWS SDKs   –   Use the Neptune Data API through the AWS SDKs to run queries programmatically. SDKs are available for Gremlin and openCypher.

  • curl and awscurl   –   Use curl to submit HTTP requests directly to the Neptune endpoints. If IAM authentication is enabled, use awscurl or curl 7.75.0+ with the --aws-sigv4 option to sign requests. For more information, see Using awscurl with temporary credentials to securely connect to a DB cluster with IAM authentication enabled.

  • Neptune notebooks   –   Use Neptune notebooks to run interactive queries in a Jupyter environment with built-in visualizations. For more information, see Using Neptune with graph notebooks.

  • Drivers   –   Connect using language-specific drivers for each query language. For Gremlin, use TinkerPop-compliant drivers available from the Apache TinkerPop project. For openCypher, use Bolt protocol drivers as described in Using the Bolt protocol. For SPARQL, use compatible tools such as RDF4J for Java as described in Java.

Using a query language to access graph data in your Neptune DB cluster

Once you are connected, you can use the Gremlin and openCypher query languages to create and query a property graph, or the SPARQL query language to create and query a graph containing RDF data.

Graph query languages supported by Neptune
Note

You can access property graph data in Neptune using both Gremlin and openCypher, but not using SPARQL. Similarly, you can only access RDF data using SPARQL, not Gremlin or openCypher.