I have been trying to access my database that i created on Amazon DocumentDB via MongoDB Compass using Ec2 Instance but following is the error I keep on getting. There are no issues with the security groups, since I have made sure to give appropriate in bound request rights.
I am able to connect to the DocumentDB cluster via mongo shell after I SSH into the ec2-instance, but I cannot connect it via MongoDB Compass because it throws me the same error that has been attached in the image below
Please help!