Does migrate-mongo work with AWS IAM authentication for DocumentDB?

Had this exact problem migrating from Atlas to DocumentDB last year. The auth error happens because migrate-mongo’s default config doesn’t handle AWS IAM properly. You’re on the right track with authMechanism and authSource, but there’s another piece that gets missed a lot. Make sure you’re running migrate-mongo 8.2.0 or higher - earlier versions had buggy MONGODB-AWS support. For the config file, your AWS credentials need to be available in the environment where you run migrations. I found using an EC2 instance with an IAM role way more reliable than passing credentials manually. Your connection options need ssl: true and sslValidate: false for DocumentDB specifically. One heads up - test your migrations thoroughly in dev first. DocumentDB has some subtle differences from regular MongoDB that can cause weird behavior during schema changes.