Troubleshoot AWS DMS connectivity failures when using MongoDB as the source endpoint

The connectivity between my AWS Database Migration Service (AWS DMS) replication instance and my MongoDB source endpoint fails with "Test Endpoint failed" errors.