0👍
✅
This was all about connecting the right IP on aws EC2 to get the right access
0👍
Okay, if you are trying to connect to a mongocluster you need o use this uri:
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]
For example:
Standalone (Not a mongo db cluster)
mongodb://mongodb0.example.com:27017
Replicaset
mongodb://mongodb1.example.com:27317,mongodb2.example.com:27017/?replicaSet=mySet&authSource=authDB
Source:stackexchange.com