Passer au contenu

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?

demandé il y a un an341 vues
1 réponse
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
EXPERT
répondu il y a un an
AWS
EXPERT
vérifié il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.