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
feita há 8 meses190 visualizações
1 Resposta
0

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

profile pictureAWS
ESPECIALISTA
Uri
respondido há 8 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas