1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hi,
Please refer to this troubleshooting guide properly: https://repost.aws/knowledge-center/lambda-import-module-error-python.
Especially, make note of this:
Important: Make sure that you put the library that you import for Python inside the /python folder.
References:
[1] https://stackoverflow.com/questions/54317115/how-do-i-import-a-python-lambda-layer
Thanks,
Atul
répondu il y a 7 mois
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 5 mois
- AWS OFFICIELA mis à jour il y a 5 mois
- AWS OFFICIELA mis à jour il y a 2 ans
My problem is that lambda has already added a layer, but it is still reporting an error:Unable to import module 'lambda_function': No module named 'pyarrow.lib'.
Okay... While creating the lambda layer zipped file, make sure you zipped the content of the folder with the code, and not the folder itself. For Reference: https://stackoverflow.com/questions/71163939/aws-lambda-layer-unable-to-import-module-lambda-function-no-module-named-pya Please let me know if this is the case and it resolves the issue. If not, please provide some more details regarding the issue.