Getting Started with Amazon Neptune

Graph databases, like Amazon Neptune, are purpose-built to store and navigate relationships. They have advantages over relational databases for use cases like social networking, recommendation engines, and fraud detection, where you need to create relationships between data and quickly query these relationships. There are a number of challenges to building these types of applications using a relational database. You would need multiple tables with multiple foreign keys. SQL queries to navigate this data would require nested queries and complex joins that quickly become unwieldy, and the queries would not perform well as your data size grows over time. At re:Invent 2018, we presented an On-ramp to Graph Databases that provides more information and detail.

Neptune uses graph structures such as nodes (data entities), edges (relationships), and properties to represent and store data. The relationships are stored as first order citizens of the data model. This allows data in nodes to be directly linked, dramatically improving the performance of queries that navigate relationships in the data. Neptune’s interactive performance at scale effectively enables a broad set of graph use cases.

If you already have your data in a graph model, it’s easy to get started with Amazon Neptune. You can load data in CSV or RDF formats and begin writing graph queries with Apache TinkerPop Gremlin, SPARQL or openCypher. You can use the getting started documentation or view the AWS Online Tech Talk via the links below. We've also consolidated Best Practices for Amazon Neptune as well. 

 
Since Amazon Neptune supports open Graph APIs and query languages, we link to external documentation for Gremlin, SPARQL and openCypher. Customers using Gremlin with Neptune often refer to the online book, Practical Gremlin: An Apache TinkerPop Tutorial, as helpful reference to augment the Apache TinkerPop Documentation. For customers using RDF and SPARQL with Neptune, the World Wide Web Consortium's SPARQL 1.1 Overview is a useful guide. openCypher is a declarative query language for property graphs that was originally developed by Neo4j, then open-sourced in 2015, and contributed to the openCypher project under an Apache 2 open-source license. Its syntax is documented in the Cypher Query Language Reference, Version 9.

If you'd like to understand how to view your data as a graph, there's a re:Invent 2018 presentation on Working Backwards to your Graph Data Model and Queries with Amazon Neptune along with sample code available on Github.

There are other samples and examples available to help you get started. We have example code for visualizing your Neptune graph. We have an application to ETL IMDB into Neptune using AWS Glue to try out graph queries to find "Six Degrees of Kevin Bacon". We have a recommendation engine sample that shows how to use collaborative filtering.

If you're interested in enabling GraphQL for access to Amazon Neptune, there's an example application showing how to use AWS AppSync GraphQL and Amazon Neptune.

If you'd like to migrate to Amazon Neptune, there's a re:Invent 2018 presentation on Migrating to Amazon Neptune. We also have a utility to convert GraphML data to the Neptune CSV format, and there is a Python Library to help with writing to Neptune from AWS Glue jobs.

Get your questions answered

Vist the Amazon Neptune Frequently Asked Questions page.

Learn more 
Sign up for a free account

Instantly get access to the AWS Free Tier. 

Sign up 
Start building on the console

Get started building with Amazon Neptune on the AWS Management Console.

Sign in