For quick launch and an introduction, see the main graph-app-kit Neptune docs.
By using graph-app-kit
with Amazon Neptune, you can visually explore graph database data and share point-and-click dashboard tools. This guides walks through manually launching Neptune, graph-app-kit
, and connecting them. Alternatively, the CloudFormation templates enable quick launching preconfigured versions of both.
Ensure your Amazon Neptune database instance can be connected to by your graph-app-kit
instance:
-
You must have or create an Amazon Neptune cluster. See the official Getting Started with Neptune docs.
-
Amazon Neptune clusters are hosted in a private VPC so the server hosting
graph-app-kit
must be granted access to the VPC. We strongly recommend hosting thegraph-app-kit
instance in a public subnet within the Neptune database's VPC. -
If using IAM authorization on your Amazon Neptune cluster the sample code provided will need to be updated to support using SigV4 signing of requests. We recommend using this tool to simplify the process.
Create an AWS EC2 graph-app-kit
instance using the usual graph-app-kit first launch step, with the following launch settings:
- Set
Network
to theVPC
ID value ("vpc-...
") from1. Setup Amazon Neptune
(unless performing an alternative like manual VPC peering) - Set
Subnet
to thePublicSubnet1
subnet ID value ("subnet-...
") from1. Setup Amazon Neptune
Auto-assign Public IP
should default toUse subnet setting (Enable)
Continue through the graph-app-kit steps to download and build.
SSH into your graph-app-kit
instance and set the following required environment variable configurations in your src/docker/.env file:
NEPTUNE_READER_PROTOCOL=wss
NEPTUNE_READER_HOST=<Insert Neptune DBClusterReadEndpoint like abc.xyz.mno.neptune.amazonaws.com>
NEPTUNE_READER_PORT=8182
For additional Neptune template options, see src/envs/neptune.env.
Reset and restart your graph-app-kit
container:
cd src/docker
sudo docker-compose down -v
sudo docker-compose up -d
Watch logs with sudo docker-compose logs -f -t --tail=1
Access your Streamlit instance at http://the.public.ip.address:8501
- Go to your Streamlit homepage using the link from the launch section you followed
- Select
GREMLIN: SIMPLE SAMPLE
from the dropdown to load a random sample of nodes from whatever Neptune database is connected - Continue to the instructions for creating custom views and adding common extensions like TLS, public/private dashboards, and more
Follow AWS and Neptune VPC Peering instructions for mapping subnets across the VPCs.
You can run Streamlit from outside of AWS. The challenge is that Amazon Neptune runs in a private VPC, meaning it exposes no internet-accessible API endpoints.
Options to connect to Amazon Neptune from a local computer include:
-
Setup an SSH tunnel for your internet connections
-
Configure a load balancer to expose the Neptune endpoint
-
Choose another way to configure secure access to a private VPC in AWS. Check the Getting Started with Neptune page for the current best recommended practices.