AWS Pandas SDK for Lambda is missing packages

0

I'm trying to create a Lambda function which basically imports a .csv file from an S3 bucket, transforms the data little bit and then save another file in S3. I'm using Python 3.11 runtime and installed PandasSDK for Python 3.11 as the layer of my Lambda function.

When I invoke the function, the first error that came was that the 'fsspec' optional package was not installed.

Then I manually created a layer with 'fsspec' package and then a new message came:

"errorMessage": "Unable to import module 'lambda_function': Install s3fs to access S3".

I tried to create a layer for s3fs, but even after that the same error appears.

AWS Pandas SDK was supposed to have all AWS Wrangler functions available to import / export data from S3 buckets. I tried many things so far but I can't find a proper answer and i'm stuck now in my development.

feita há 9 meses646 visualizações
1 Resposta
0
Resposta aceita

After better analyzing the code, I was using the "normal" pandas way to try to ingest the data into S3. I changed the code to use the "to_csv" from awsrwrangler package, and it worked!

respondido há 9 meses
profile pictureAWS
ESPECIALISTA
avaliado há 9 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