Creating Mongodb object once lambda python?

The only change I made in my code was to my MongoDB URL, changing the URL, username and password. The error message from CloudWatch had part of the MongoDB URL redacted using “XXXXXXXXXXX”.