. Advertisement .
..3..
. Advertisement .
..4..
Hi guys,
This morning I got an “unable to import module ‘index’: error” when I try to run my AWS Lambda code in Python.
I don’t have any experience about this issue. Can someone tell me how to resolve it?
Many thanks!
The cause: This issue often appears when the specified library in the Python code cannot be located by your Lambda environment. This is due to the fact that not all Python libraries come bundled with Lambda.
Solution: Create a deployment package or Lambda layer that contains the libraries you intend to utilize in your Python code for Lambda in order to fix this mistake.
Note: Don’t forget to place the Python library you imported within the /python folder.