aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

Aws lambda unzipped size error - aws chalice #2081

Closed dewirizki closed 1 year ago

dewirizki commented 1 year ago

I think it my deployments packages less than 250 mb, but i still got an error likes this An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: Unzipped size must be smaller than 53642504 bytes

tareshss commented 1 year ago

Can you share your requirements.txt and any layers you are using?

"This quota applies to all the files you upload, including layers and custom runtimes."

Source

50 MB (zipped, for direct upload)

250 MB (unzipped)

dewirizki commented 1 year ago

size of my zipped file just 4x.xx MB, and this one a requirements.txt that i used on this project and I add a layer in configuration file image

tareshss commented 1 year ago

my guess is that the layer along with fastparquet pushes you over the 250 MB unzipped size.

the list of requirements for fastparquet is pretty hefty

numpy pandas cython >= 0.29.23 (if building from pyx files) cramjam fsspec

I would recommended researching how to use pandas, etc for aws lambda with another layer aws chalice project or googling how to import pandas in aws lambdas.

Like this article, especially this part "Build From Source"