Skip to content

Instantly share code, notes, and snippets.

@bmorrisondev
Created January 23, 2019 14:51
Show Gist options
  • Save bmorrisondev/0dfb626a5058fa9d429770cf48b2ae70 to your computer and use it in GitHub Desktop.
Save bmorrisondev/0dfb626a5058fa9d429770cf48b2ae70 to your computer and use it in GitHub Desktop.
A sample user model using Dynamoose, an ORM for AWS DynamoDB with a similar API to Mongoose
const dynamoose = require('dynamoose');
let configUpdates = {
region: "us-east-1",
accessKeyId: 'key123',
secretAccessKey: 'secret123'
}
dynamoose.AWS.config.update(configUpdates);
let tableName = 'Project.TestEnv.ModelName'
let User = dynamoose.define(tableName, {
firstName: String,
lastName: String,
emailAddress: String
})
module.exports = User;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment