Dynamoose is a modeling tool for Amazon's DynamoDB (inspired by Mongoose)
$ npm install dynamoose
Set AWS configurations in enviroment varable:
export AWS_ACCESS_KEY_ID="Your AWS Access Key ID"export AWS_SECRET_ACCESS_KEY="Your AWS Secret Access Key"export AWS_REGION="us-east-1"
Here's a simple example:
var dynamoose = ;// Create cat model with default optionsvar Cat = dynamoose;// Create a new cat objectvar garfield = id: 666 name: 'Garfield';// Save to DynamoDBgarfield;// Lookup in DynamoDBCat;
The documentation can be found at https://dynamoosejs.com/api.
The goal of release 0.9 is to increase the parity with mongoose. The primary purpose will be to come up with a plugin system similar to that of mongoose although not necessarily compatible.
The main goal of 1.0 will be to improve the code and refactor to ES2015 (ES6). In addition,
useDocumentTypes will be toggled to make uses of "newer" DynamoDB features by default.
useDocumentTypesto default to