Direkt zum Inhalt

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?

gefragt vor einem Jahr341 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor einem Jahr
AWS
EXPERTE
überprüft vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.