I followed a guide on how to setup a privatelink with mongodb atlas
I’m unable to connect to my database using mongodb shell and private endpoint inside ec2 terminal, but I managed to connect with standard connection after whitelisting ec2 public ip.
Things I checked
- make sure endpoint status is “available” on both ends
- make sure database cluster is in the same region as vpc endpoint
- make sure endpoint is created on the same vpc as ec2 instance (it’s my default vpc)
- make sure ec2 security group has allowed outbound connections (by default its set to all 0.0…0.0)
What else could I check to see where is the problem?