AWS lambda with large size library

0

I want to use "rembg" library with AWS lambda python function. I tried to upload rembg library code to lambda layer or function code. AWS says that library file size is too large to include to lambda. Could you tell me the way to use rembg library in AWS lambda?

質問済み 1年前1318ビュー
2回答
1

Have you tried using a Container image for Lambda - those can be up to 10 GB in size.

profile pictureAWS
エキスパート
回答済み 1年前
1

You have several limitations for AWS lambda https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html

If your zip file is bigger that 50 MB and you can made a direct upload, upload de file to S3 and deploy from there. https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-zip.html

Another option is use lambda layers. Package rembg as layer and you only need to upload the custom code.

If you are hitting the 250 MB limit for unzipped source code (including dependencies and lambdas), use a lambda container instead of .zip

回答済み 1年前

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

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

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

関連するコンテンツ