AWS Lambda Layer Dependency not being recognized.

0

Hi all so I have a python script I am running with lambda. When I test it without "import pandas" it works. But when I try doing it with pandas I get the following error:

Response
{
  "errorMessage": "Unable to import module 'lambda_function': No module named 'pandas'",
  "errorType": "Runtime.ImportModuleError",
  "stackTrace": []
}

Function Logs
START RequestId: dc5c7c9d-3e13-4d9a-88e8-0dbb8bba81ad Version: $LATEST
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'pandas'
Traceback (most recent call last):END RequestId: dc5c7c9d-3e13-4d9a-88e8-0dbb8bba81ad
REPORT RequestId: dc5c7c9d-3e13-4d9a-88e8-0dbb8bba81ad	Duration: 1.72 ms	Billed Duration: 2 ms	Memory Size: 128 MB	Max Memory Used: 39 MB

Worth noting that the size of the layer is 44mb. I plan on eventually adding more packages. I created a zip file called aws_test2 which contains the following file path and content: image

Im sure it's something with my zip folder... New to AWS so any advice helps!

Kevin
gefragt vor 8 Monaten190 Aufrufe
1 Antwort
0

Take a look here. Your dependencies should be stored under a specific folder (python or python/lib/python3.x/site-packages).

profile pictureAWS
EXPERTE
Uri
beantwortet vor 8 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen