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
preguntada hace 8 meses190 visualizaciones
1 Respuesta
0

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

profile pictureAWS
EXPERTO
Uri
respondido hace 8 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas