1

I am trying to update a lambda function that is only 54mb and i get the size limit exceeded error. There is only one version of it so not clear as to why this would happen. Thanks in advance!

...

Serverless: Packaging function: createDonation...

Serverless: Excluding development dependencies...

Serverless: Uploading function: createDonation (53.89 MB)...

Serverless Error ---------------------------------------

 Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation

...
Ryan Carville
  • 355
  • 7
  • 15

1 Answers1

3

Lambda has deployment package size limit of 50MB. In your case its exceeding.

Please refer to the documentation here: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html

  • thank you but I am confused. Why does the error state 69MB then. Also that documentation claims functions/layers have a default size of 75mb? – Ryan Carville Sep 26 '20 at 13:42
  • 1
    Functions/Layers have 75GB storage for layers of multiple versions. You can upload through S3 instead of uploading directly. That will allow upto 250MB of package. –  Sep 26 '20 at 13:52