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.

질문됨 9달 전647회 조회
1개 답변
0
수락된 답변

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!

답변함 9달 전
profile pictureAWS
전문가
검토됨 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠