跳至内容

lambda function package dependencies > 250M limit

0

I use opencv, scipy, and a few other popular packages in my Python program, at first I tried the simplest way, build package dependencies into a zip file, upload to s3, and then add a lambda layer for this s3 address, but the folder size is 460M (even the .zip file is only 152M). I checked and looks like I should use lambda container images, it also means I need to spend some time learning, is there any other simpler way? I am very surprised AWS does not include those popular packages.

btw, I wrote those Python programs in Windows vsode, also I use Windows to build package dependencies into a zip file. will it be a problem since lambda functions will run on a Linux platform?

已提问 1 年前341 查看次数
1 回答
1

The recommended approach is to use container images. There is no way to increase the 250 MB limit on the package size with zip files.

With regards to using Windows for creating the package, it should not be an issue, as long as you include in the package the right artifacts, for instance, some Python dependencies may be built using compile libraries, which should be built for the right platform.

AWS
专家
已回答 1 年前
AWS
专家
已审核 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。