I need to import numpy for a lambda function. Already tried to create a layer but it is still not working.
Here is the log: [ERROR] Runtime.ImportModuleError: Unable to import module 'main_lambda': Unable to import required dependencies: numpy: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.
I'm using python3.13
It can have multiple reasons. I can't figure out how you created layer. Did you used venv locally and then uploaded library packages from it? How did you test if numpy was added successfully? Are you using correct version of Lambda layer?
Another simple approach I will suggest you to use by running container on Lambda. Put package via Dockerfile into image and run container using that image.