The MONGODB-AWS auth examples should use mongodb+srv: https://pymongo.readthedocs.io/en/stable/examples/authentication.html#aws-lambda-environment-variables
Reported in https://www.mongodb.com/community/forums/t/aws-lambda-unable-to-connect-to-atlas-serverless/219323/3