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

aws-dynamodb-document-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-dynamodb-document-api

### Usage

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

aws-dynamodb-document-api

Usage

Credentials
require('aws-dynamodb-document-api').credentials.profile(<profile:string>, <region:string>);
require('aws-dynamodb-document-api').credentials.loadFromPath(<path to config:string>, <region:string>);
Install
npm install aws-sdk --save
npm install
Initialize
var dynamoDb = require('aws-dynamodb-document-api');
var dynamoDoc = dynamoDb.document;
dynamoDoc.setPrimaryKey(<table primary key:string>);
CRUD
dynamoDoc.create(<table name:string>, <property:object>);

dynamoDoc.get(<table name:string>, <table primary keys:object>);

dynamoDoc.update(<table name:string>, <property:object>);

dynamoDoc.removeById(<table name:string>, <table primary keys:object>);
CRUD (Create Example)
var dynamoDb = require('aws-dynamodb-document-api');
var dynamoDoc = dynamoDb.document;
dynamoDoc.setPrimaryKey('id');
dynamoDoc.create('books_by_stephen_king', {
  id: '2016',
  author: 'Stephen King',
  title: 'End of Watch',
  price: 30.00,
  metadata: {
    rating: 5
  }
}).then(function(response) {
  console.log(response.message);
}).error(function(response) {
  console.log(response.message);
})

FAQs

Package last updated on 17 Jul 2016

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