Search code examples
amazon-web-servicesamazon-dynamodbpassport-google-oauth2

Google Authentication with Dynamodb instead of mongoose


I have been following this tutorial and it has given me great insight into linking up a mongodb and getting back google authentication. However, I want to use dynamodb, and I found this to hook up a localhost dynamodb to test out my theories, but I am not sure how to swap out mongoose - because I don't want it linking to a mongodb, or can I use mongoose for the schema and tell it to write to a dynamodb? Not sure. Thanks for any guidance in advance. I'm new to aws if you can't tell.


Solution

  • Mongoose is a library for connecting to MongoDB. I believe your question title should be "DynamoDB instead of MongoDB".

    You can't use Mongoose to connect to DynamoDB. There are many differences between MongoDB and DynamoDB. If you want to use DynamoDB with your NodeJS application you should look into using the AWS SDK for NodeJS.

    Please be aware that there are major differences between MongoDB and DynamoDB. It's not going to be trivial to take a MongoDB tutorial and modify that to work with DynamoDB. I highly recommend you read up on DynamoDB and understand its restrictions and limitations before committing to using it.