-
-
Save svngoku/78f5914d4d64c02823c2c1db638d5c21 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 hidden or 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