Connections

Atlas & Cloud

Connect Sutido to MongoDB Atlas and other cloud database providers.

Overview

Sutido works seamlessly with cloud-hosted MongoDB databases including MongoDB Atlas, AWS DocumentDB, and other MongoDB-compatible services.

MongoDB Atlas

MongoDB Atlas is the official cloud database service from MongoDB. Here's how to connect:

1. Get Your Connection String

  1. Log in to MongoDB Atlas
  2. Select your cluster
  3. Click "Connect"
  4. Choose "Connect your application"
  5. Copy the connection string

2. Configure IP Access

Atlas requires your IP address to be whitelisted:

  1. Go to "Network Access" in the Atlas dashboard
  2. Click "Add IP Address"
  3. Add your current IP or use "Allow Access from Anywhere" (0.0.0.0/0) for testing

Security Note: For production use, restrict access to specific IP addresses rather than allowing access from anywhere.

3. Connect in Sutido

  1. Click "New Connection"
  2. Select the "URI" tab
  3. Paste your Atlas connection string
  4. Replace <password> with your database user password
  5. Click "Test Connection"
  6. Save your connection

Atlas Connection String Format

mongodb+srv://username:password@cluster0.xxxxx.mongodb.net/mydb?retryWrites=true&w=majority

Atlas Shared Clusters (M0/M2/M5)

Free and shared tier clusters work the same way. Note that some operations may be restricted on shared clusters:

  • Collection and index creation limits apply
  • Some admin commands are restricted
  • Connection limits are lower

Atlas Dedicated Clusters

Dedicated clusters (M10 and above) provide full functionality:

  • No operation restrictions
  • Higher connection limits
  • VPC peering support
  • Private endpoints available

Private Endpoints

For enhanced security, Atlas dedicated clusters support private endpoints:

  • AWS PrivateLink: Connect from AWS VPCs
  • Azure Private Link: Connect from Azure VNets
  • GCP Private Service Connect: Connect from GCP VPCs

When using private endpoints, you'll need to configure SSH tunneling to reach the private endpoint from your local machine.

Other Cloud Providers

Self-Hosted on Cloud VMs

For MongoDB running on cloud VMs (EC2, GCE, Azure VMs):

  • Use the VM's public IP or hostname
  • Ensure port 27017 is open in security groups/firewalls
  • Consider using SSH tunneling for secure access

Kubernetes Deployments

For MongoDB running in Kubernetes:

  • Expose the service via LoadBalancer or NodePort
  • Or use kubectl port-forward for temporary access
  • Consider an SSH tunnel to a bastion host in the cluster

Connection Best Practices

Use Strong Passwords

Generate strong, unique passwords for database users. Atlas can generate secure passwords for you in the user creation dialog.

Least Privilege Access

Create database users with only the permissions they need. Avoid using the root user for day-to-day development.

Rotate Credentials

Periodically rotate database passwords. When you change a password in Atlas, update your Sutido connection to match.

Troubleshooting Cloud Connections

Connection Timeout

  • Verify your IP is in the Atlas IP Access List
  • Check if you're behind a VPN that changes your public IP
  • Try using a different network

Authentication Failed

  • Double-check the password in the connection string
  • Ensure you're using the database user credentials (not your Atlas account)
  • Verify the user exists in Atlas Database Access

SSL/TLS Errors

Atlas connections require TLS. Sutido handles this automatically when using the mongodb+srv:// connection string format.

Next Steps

Learn about organizing your queries with Query Snippets.