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ヶ月前646ビュー
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ