A client for dynamodb using promises.
A client for DynamoDB using promises.
Install:
``
`
npm i dynopromise-client
`
Requires aws-sdk to be installed globally. This is not listed as a hard
dependency, because it is already made available to Lambda functions when
running in the Lambda environment, therefore does not actually need to be
included in your package locally.
Usage:
``
const dynamodb = require('dynopromise-client')
const db = dynamodb({
accessKeyId: ...,
secretAccessKey: ...,
...,
})
db.put({
TableName:
Item: {
...
}
})
.then(() =>
.catch(err =>
Options are passed through to the constructor specificed here:
https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#constructor-property
Promisified methods:
batchGet, batchWrite, createSet, delete, get, put, query, scan, update