I am trying to create a function using Lambda in Python on Linux. I have tried to use pyad, but it gave me Exception: Must be running Windows in order to use pyad.
What other way can i create user and group in AD?
Thanks
I can see 2 aspects that you should pay attention.

Lambda runs in a Linux environment. So, if you have some library that uses internal resources from windows, it won't work on AWS Lambda environment. You should search another option, like python-ldap or something similar.
Lambda environment provides only basic python modules. For sure pyad or python-ldap is not included. So, if you want to use it, make sure you will add this module in your zip lambda file.
How to create user and group in AD using Lambda