Rhino3dm, using AWS Lambda Python Function to read 3dm file

I’m trying to create a simple function in AWS Lambda to read 3dm files stored on S3 bucket and return how many objects/geometries are in the file.
Has anyone had any luck with Rhino3dm and Lambda ?

I had tested on a local machine running Windows 7 and Python 3.7
However, when I uploaded to Lambda (including the rhino3dm module dependency) it had trouble importing rhino3dm module.
See error and screenshot below.

“errorMessage”: “Unable to import module ‘myLambdaFunction’: No module named ‘rhino3dm._rhino3dm’”,
“errorType”: “Runtime.ImportModuleError”

Hi Tony,
I haven’t tried but if I got this error I would try this:


Thanks Graham,
I have followed the instructions and uploaded the function package.
It seems like rhino3dm module was detected, however the rhino3dm._rhino3dm seems to be the issue.
I believe this is a pyd (_rhino3dm.cp37-win32.pyd) inside the rhino3dm module.

Note that AWS Lambda is a Linux environment. There aren’t any prebuild rhino3dm.py packages, so you’ll have to build one yourself.