Socket
Book a DemoInstallSign in
Socket

neptune-lambda-client

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

neptune-lambda-client

Gremlin client to robustly query AWS Neptune from AWS Lambda

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

neptune-lambda-client

Overview

A very simple Gremlin client to robustly query AWS Neptune from AWS Lambda. The client will automatically reestablish a connection to the database if the web socket connection closes and will also automatically retry (5 times) when it encounters ConcurrentModificationException and ReadOnlyViolationException errors.

Usage

This client is instantiated with a factory function and exposes a single function called query. query accepts a single argument, which is a function that use the Gremlin g object.

const gremlinClient = require('neptune-lambda-client');

const {query} = gremlinClient.create({
    host: 'neptune-db-url',
    port: '8182',
    useIam: true
});

async function getNode(id) {
    return query(async g => g.V(id).next().then(x => x.value));
}

Keywords

aws

FAQs

Package last updated on 25 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts