Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lifeomic/dynamodb-dataloader

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/dynamodb-dataloader

A DataLoader that batches DynamoDB item lookups

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
increased by1200%
Maintainers
1
Weekly downloads
 
Created
Source

dynamodb-dataloader

npm Build Status Greenkeeper badge

A DataLoader that batches requests for DynamoDB. The DataLoader can fetch items from multiple tables at once so you should only need one instance per request.

You should be able to replace your calls to dynamoClient.get with loader.load and automaticly switch your network calls from GetItem to BatchGetItem.

NOTE: Make sure you update your IAM policy to allow dynamodb:BatchGetItem if you have strict IAM policies

Example code

const { createDataLoader } = require('@lifeomic/dynamodb-dataloader');

// Once per request or scope that can share data access
const client = new AWS.DyanmoDB();
const loader = createDataLoader({ client });

// Once per item fetch
const item = await loader.load({
  table: 'your table name',
  key: { idAattribute: { S: 'some id' } }
});

FAQs

Package last updated on 22 Feb 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc