Package Exports
- serverless-dynamodb-client
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-dynamodb-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-dynamodb-client
This Serverless 0.5.x plugin help you to call AWS Dynamodb SDK without switching between different dynamodb instances, whether you work with Dynamodb local or online in AWS.
This Plugin Requires
Using in your code
For each Lambda function, run the following command to add it to the npm package.json dependancies list
npm install --save serverless-dynamodb-client
Then you can use dynamodb in your code as follows
var dynamodb = require('serverless-dynamodb-client');
var rawClient = dynamodb.raw; // returns an instance of new AWS.DynamoDB()
var docClient = dynamodb.doc; // return an instance of new AWS.DynamoDB.DocumentClient()
Note: You need to run the serverless-dynamodb-local with default port: 8000 for this library to work
References
- Dynamodb SDK (rawClient): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html
- Dynamodb Document Client SDK (docClient): http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html