Session Manager
The SessionManager API manages the full lifecycle of a Neptune Analytics graph for data lake analytics: create → import → analyze → export → destroy.
This is the primary interface for the “Graph Over Data Lake” workflow — run graph algorithms on data that lives in your data lake without moving it permanently into a graph database.
How it works
Section titled “How it works”-
Define your data source — point to S3 Tables, Databricks, Snowflake, OpenSearch, or any Athena-accessible source
-
Create a graph — SessionManager provisions a Neptune Analytics instance
-
Import data — project your tabular data into graph form via Athena SQL queries
-
Analyze — run graph algorithms (community detection, centrality, traversal) or explore with openCypher
-
Export results — write results back to S3 or persist as Iceberg tables
-
Destroy — tear down the graph when done (no ongoing cost)
Supported data sources
Section titled “Supported data sources”| Source | Connector | Demo |
|---|---|---|
| Amazon S3 Tables | Native Athena SQL | Notebook |
| Amazon S3 Vectors | Custom Athena connector | Notebook |
| Databricks Unity Catalog | JDBC-based Athena connector | Notebook |
| Snowflake | Athena Snowflake connector | Notebook |
| Amazon OpenSearch | Athena OpenSearch connector | Notebook |
| Any Athena source | 25+ federated connectors | — |
For data already in S3-compatible formats (CSV, Parquet), Neptune Analytics also supports native S3 import without Athena.
Use cases
Section titled “Use cases”- Fraud detection — project financial transactions as a graph, run Louvain to identify fraud rings
- Product recommendation — project product catalogs with vector embeddings, run similarity search
API overview
Section titled “API overview”The SessionManager class is in nx_neptune/session_manager.py.
from nx_neptune.session_manager import SessionManager
session = SessionManager( graph_id="my-graph", region="us-west-2", iam_role_arn="arn:aws:iam::123456789012:role/NeptuneRole", s3_import_path="s3://my-bucket/import/", s3_export_path="s3://my-bucket/export/",)
# Create graph, import data, run algorithms, export, destroyInstance management
Section titled “Instance management”For explicit control over Neptune Analytics instance lifecycle (create, start, stop, delete), see the instance management module:
Configuration settings are handled through the NeptuneConfig class in nx_plugin/config.py.
Notebooks
Section titled “Notebooks”- SessionManager comprehensive demo — full create → import → analyze → export → destroy workflow
- S3 import/export demo — import from and export to S3