Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Compressing libraries with zip: true not working for me, is it for anyone else? #839

Unanswered
bjornhansen asked this question in Q&A
Discussion options

Under the "Dealing with Lambda's size limitations" section of the readme, it suggests compressing libraries to save space. But when I try to use it as it is in the docs, I get import errors.

I'm using

custom:
 pythonRequirements:
 zip: true

in serverless.yml and

try:
 import unzip_requirements
except ImportError:
 pass

in my handler module at the very top.

Any ideas why this isn't working? Has anyone else got it working? I'm using FastAPI with mangum ASGI adapter, would this throw off the import paths?

You must be logged in to vote

Replies: 1 comment

Comment options

mm try to add too, in my case works fine, try to reinstall sls or node
zipImport: true

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /