You have to compile your scripts into an output that will also include the packages you want to include and then copy and paste all of that output into the lambda script. It is not pretty or friendly. I just found an alternative lambda provider when my scripts need packages to be compiled but that loses a little bit of the power and purpose of Dgraph having the lambda close to the db.
Another reason why the “almighty” lambda is not always the best solution. It would be better if it was to work more closely like Auth0 uses custom scripts.