Saltar al contenido

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?

preguntada hace un año341 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace un año
AWS
EXPERTO
revisado hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.