I'm getting the error message "unzipped size must be smaller than 262144000 bytes" when I try to upload to AWS Lambda using Zappa. Reading a previous thread I was told that i need to add : "slim_handler": true to handle files greater than 50MB in the zappa_settings.json, but after adding i'm getting OSError: Pypi lookup failed. Please let me know how to fix this issue?

Error after adding "slim_handler": true -->

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/cli.py", line 2778, in handle sys.exit(cli.handle()) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/cli.py", line 512, in handle self.dispatch_command(self.command, stage) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/cli.py", line 559, in dispatch_command self.update(self.vargs['zip'], self.vargs['no_upload']) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/cli.py", line 911, in update self.create_package() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/cli.py", line 2237, in create_package venv=self.zappa.create_handler_venv(), File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/zappa/core.py", line 440, in create_handler_venv raise EnvironmentError("Pypi lookup failed") OSError: Pypi lookup failed

1

There are 1 answers

0
wst On

This is because of a bug in Zappa's dependency configuration. See: https://github.com/zappa/Zappa/issues/995. This problem was recently answered here: https://stackoverflow.com/a/68191556/1226554

As a quick fix, you can pin pip-tools to version 6.1.0 in your requirements.txt