Skip to content

DMS Mongo Atlas 7 to RDS Aurora Postgres

0

Hi, I'm trying to run DMS on a Mongo Atlas 7.0 (size M10) and copy into RDS Aurora Postgres, but I'm running into an error about not being able to get the Mongo version and edition. I set up VPC Peering successfully & doesn't overlap with other VPC peering connections. I have added a route in the route tables (public & private subnets) from my VPC to the Atlas VPC. I can successfully telnet from an EC2 instance from my VPC into the shard on port 27107. On the Mongo side, I added my AWS VPC IP range into the IP Access List.

For the Mongo users, I tried:

  • root user with atlasAdmin@admin & clusterMonitor@admin roles
  • opsloguser user with clusterMonitor@admin, read@source-db, read@local, read@admin, readAnyDatabase@admin, read@config

For DMS, I tried Serverless and replication instance v3.6.1 modes. With the replication instance, I tried to "Test connection" and it succeeded. But when I try to start the DMS task, I get an error "DMS was unable to get information about source endpoint's version and edition. Status code: 400". Both Serverless & replication instance gives a similar error.

It seems I'm very close but something is missing. Please help? Thanks

1 Answer
0

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:

  1. 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:
  • clusterMonitor role at the admin database (which you have)
  • readAnyDatabase role at the admin database (this might be missing)
  • Sufficient read permissions on the specific databases you're migrating
  1. 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".

  2. 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.

  3. 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
  1. 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

  • I added the readAnyDatabase@admin and read@config permission to the opsloguser and it still had the same problem

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.