Created
January 23, 2019 14:51
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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