aws-samples/amazon-neptune-samples

Samples and documentation for using the Amazon Neptune graph database service

What it solves

Amazon Neptune is a graph database service. This repository gathers practical examples that show how to use Neptune for different tasks, from building prototypes to streaming data into the database or running graph machine learning. Instead of searching across many places, developers can find ready-made code and patterns here.

How it works

The repository is organized as a set of independent sample projects. Each project focuses on a specific use case or technology combination. For example, one project uses AI agents to guide you from a short description of your use case to a working prototype on Neptune, including generating a graph model, populating data, and writing queries. Another project shows how to build a Flink application that reads from Kinesis and writes into Neptune. A separate Python package (NeptuneGS) prepares Neptune data for use with GraphStorm, a graph neural network library, to add predictions or embeddings to your graph. Other samples cover query languages like Gremlin and openCypher, data migration, visualization, and performance testing.

Who it’s for

Developers, data engineers, and data scientists who are working with Amazon Neptune and want to learn from practical, runnable examples. The projects are sample code, maintained on a best-effort basis, and may need extra work before use in production. If you are new to graph databases or need a starting point for a specific integration (e.g., streaming, machine learning, visualization), these examples are a good place to look.

Highlights

  • AI-agent-guided prototyping: Describe a use case (like fraud detection) and a series of agents will generate a graph model, populate sample data, and create queries for you.
  • Streaming example: Set up an Apache Flink application that consumes Kinesis streams and writes into Neptune Database.
  • Graph machine learning: NeptuneGS streamlines using GraphStorm with Neptune, letting you add embeddings and predictions to your graph.
  • Diverse query language examples: Gremlin and openCypher cheat sheets, data modeling guides, and client demos for Java and Node.js.
  • Migration and ETL help: Examples for moving from relational databases (like MySQL) or from Neo4j to Neptune.
  • Visualization: Hands-on exercises using Ogma and VIS.js libraries to see graph data in action.

Related

  • Project
  • Project
  • Project
  • Project