I am using ExpressJS to build a Backend Server using AWS EC2 Instance with Bitnami MEAN stack as a server and DocumentDB as the database.
I have tried running the backend codes on my local machine and MongoAtlas and it works perfectly. However, when I tried to connect to the documentDB server by following online guides and tutorials, I meet authentication failures.
The following is my attempt at App.js documentdb connection using Mongoose.
DB_CONNECTION is the connection string that I have copied off the AWS DocumentDB Cluster with my Password included.
(I placed in a separate file and imported it over)
The following is the error that I receive when running node app.js to start the expressJS codes
I've covered certain area in white for privacy, hope you understand.
Online tutorials havent been successful. Any help will be greatly appreciated!
Thank you in advance!
I cant embbed images due to by low reputation score. Thank you!
Authentication errors are typically the result of an incorrect username and password. If you are trying to login with master-user and have forgot the password, you can reset the password by modifying the cluster: https://docs.aws.amazon.com/documentdb/latest/developerguide/db-cluster-modify.html. If you are trying to login as a regular user, you can reset the password using the mongo shell by using the following command: db.changeUserPassword(username, password)