Why am I getting connection timed out when connecting to AWS Document DB from my local machine with TLS disabled?

Viewed 908

When utilizing AWS' connection string to connect to my Amazon Document DB instance in Robo3T I'm getting a 'Connection Timed Out' error.

Error connecting to ....cluster-....us-east-1.docdb.amazonaws.com:27017 (123.45.67.89:27017) :: caused by :: Connection timed out :

1 Answers

AWS does not currently support connecting to Document DB from public endpoints when not using SSH.

Connecting from Public Endpoints

You are trying to connect to an Amazon DocumentDB cluster directly from your laptop or local development machine.

Trying to connect to an Amazon DocumentDB cluster directly from a public endpoint, such as your laptop or local development machine, will fail. Amazon DocumentDB is virtual private cloud (VPC)-only and does not currently support public endpoints. Thus, you can't connect directly to your Amazon DocumentDB cluster from your laptop or local development environment outside of your VPC.

To connect to an Amazon DocumentDB cluster from outside an Amazon VPC, you can use an SSH tunnel. For more information, see Connecting to an Amazon DocumentDB Cluster from Outside an Amazon VPC. Additionally, if your development environment is in a different Amazon VPC, you can also use VPC Peering and connect to your Amazon DocumentDB cluster from another Amazon VPC in the same region or a different region.

More details here: https://docs.aws.amazon.com/documentdb/latest/developerguide/troubleshooting.connecting.html#troubleshooting.cannot-connect.public-endpoints

Related