0

I am looking for some suggestions/guidance with python ldap3 running from a lambda function. There is a limit on run-time (15 minutes). I have a python script that pulls all the user's information from the domain, however the lastLogon attribute is not accurate as this value is not synced/replicated, I have to loop through out all the domain controllers to get the latest value. There more than thousand users. is there a way using ldap3 to open concurrent connections to the domain controllers and gather this value for all users. I want to avoid to open a connection every time I need to search and end up with thousands of open/close connections.

Please let me know if more information is needed.
Thank you

  • You can use Python concurrency features (threading or multiprocess) to create multiple ldap connections and handle them in parallel. The [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) module might be worth a look. – larsks Jun 28 '23 at 20:26

0 Answers0