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?

adam
asked 24 days ago162 views
1 Answer
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.

profile pictureAWS
EXPERT
Uri
answered 24 days ago
profile pictureAWS
EXPERT
reviewed 24 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions