Gremlin drivers with Neptune when connecting through an EC2 instance?

Hello! Currently connecting to a Neptune db from my cloud desktop/local environment..? by using aws session manager with an ec2 instance. I'm using an api to send queries to neptune but was wondering if in a case like this, gremlin drivers are possible to use or if i have to keep with the http-based approach! the json responses are pretty convoluted still super fresh on anything neptune (or even db related!) so i'm not sure i'm making the best choices or wording this correctly 😭
5 Replies
Andrea
Andrea•2mo ago
yes it's possible to use the drivers as they are all just using web sockets or http under the hood
Andrea
Andrea•2mo ago
here's aws documentation example of using the python GLV for example: https://docs.aws.amazon.com/neptune/latest/userguide/access-graph-gremlin-python.html
Using Python to connect to a Neptune DB instance - Amazon Neptune
Steps for connecting to Neptune using Python.
myamura
myamuraOP•2mo ago
the cloud desktop itself isnt in the same vpc so i was worried it wouldnt work well esp if the connection got cut out :0 ty! will look more into it will explore notebooks again as well.. have been doing everything manually as i was running into issues once i set up the connection 😭😭😭
Andrea
Andrea•2mo ago
there's recent discussion ini the general channel regarding connecting to neptune from a local environment: https://discord.com/channels/838910279550238720/838910279550238723/1397597178431803494
Captator
Captator•2mo ago
I reckon Neptune notebooks are the easiest thing to setup for direct access to a Neptune DB, via Python at least. A bit more complicated, but you can relay through a SSM-managed EC2 setup (t3.micro instance is enough) in the same VPC as Neptune, connecting to it from a local machine, so I imagine the same approach works from an EC2 cloud desktop. This approach might make it easier to use non-Python SDKs, though I've only used Python. Fair warning, I recall there is a bit of complexity in getting the connection to behave, because you end up connecting to the local entrance to the SSM tunnel as if it were the remote DB, which needs some header tweaking.

Did you find this page helpful?