- Newest
- Most votes
- Most comments
Based on your description, it sounds like you've set up most of the network connectivity correctly between your AWS environment and MongoDB Atlas, but there might be a few issues preventing AWS DMS from properly connecting to your MongoDB Atlas source.
For MongoDB Atlas as a source for DMS, there are several specific requirements to ensure proper connectivity:
- User Permissions: While you've created users with various roles, MongoDB Atlas specifically requires certain permissions for DMS to work properly. For DMS to access MongoDB Atlas, the user should have:
clusterMonitorrole at the admin database (which you have)readAnyDatabaserole at the admin database (this might be missing)- Sufficient read permissions on the specific databases you're migrating
-
Connection String Format: When configuring the MongoDB Atlas endpoint in DMS, ensure you're using the correct connection string format. For MongoDB Atlas, you should use a connection string with SSL Mode set to "verify-full".
-
Oplog Size: Ensure your MongoDB Atlas cluster has a sufficient oplog size for the duration of your migration. This is especially important for ongoing replication.
-
Network Configuration: While you've set up VPC peering correctly, make sure:
- The DMS replication instance's security group allows outbound traffic to the MongoDB Atlas VPC
- The MongoDB Atlas IP allowlist includes the specific IP addresses of your DMS replication instance (not just the VPC range)
- If using AWS PrivateLink (available for Enterprise tier), ensure it's properly configured
- MongoDB Version Compatibility: Verify that AWS DMS fully supports MongoDB 7.0 with the DMS version you're using. Some newer database versions might require specific DMS versions.
Since your test connection succeeded but the task fails with a version detection error, it suggests that the basic connectivity is working, but DMS might not have sufficient permissions to query system collections needed for version detection, or there might be a compatibility issue between your DMS version and MongoDB 7.0.
Try creating a user with the readAnyDatabase role in addition to your existing roles, and ensure your connection string is properly formatted for SSL connectivity to MongoDB Atlas.
Sources
Amazon DocumentDB migration runbook - Amazon DocumentDB
Can not connect to Atlas Mongo server from Fargate container without public IP | AWS re:Post
answered 10 months ago
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 10 months ago

I added the
readAnyDatabase@adminandread@configpermission to theopsloguserand it still had the same problem