serverless: Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation
Are you certain it’s a bug?
- Yes, it looks like a bug
Is the issue caused by a plugin?
- It is not a plugin issue
Are you using the latest version?
- Yes, I’m using the latest version
Is there an existing issue for this?
- I have searched existing issues, it hasn’t been reported yet
Issue description
Same issue as reported upon https://stackoverflow.com/questions/50674084/serverless-framework-request-must-be-smaller-than-69905067-bytes-for-the-update
Serverless: Excluding development dependencies...
Serverless: Uploading function: devicelogV1 (70.04 MB)...
Serverless Error ----------------------------------------
Request must be smaller than 69905067 bytes for the UpdateFunctionCode operation
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 17.0.1
Framework Version: 2.52.1 (local)
Plugin Version: 5.4.7
SDK Version: 4.3.0
Components Version: 3.17.1
Service configuration (serverless.yml) content
N/A
Command name and used flags
npx serverless deploy --function devicelogV1 --stage dev
Command output
N/A
Environment information
$ npx serverless --version
Framework Core: 2.52.1 (local)
Plugin: 5.4.7
SDK: 4.3.0
Components: 3.17.1
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 20
- Comments: 22 (11 by maintainers)
Thanks for explanation @NickKelly1 - we’ve seen similar reports for some specific libraries but we’ve never had a lot of these reports and didn’t get to the root of the issue. If you manage to pinpoint what is exactly causing the problem in your setup, please let us know so maybe we can fix it on the Framework side if possible
Hello,
In my project I’m currently unable to full deploy for operational reasons so I deploy my wip as single functions. I ran into an issue after upgrading my npm version from 6 to 8 (and consequently package-lock.json and npm installing). Although the size of node_modules remained virtually unchanged around 350mb after moving from npm v6 to npm v8, my serverless zipped lambda function went from 14mb to 60mb, causing my single function deploy fail.
I’ve worked around the issue for now by reverting to npm version 6 but I’m confused why this issue would arise.
I can’t check right now but I believe my packages may be between 1-2 years out of date, so I may be missing fixes.
I guess if nobody else is having this issue and I’ve got a workaround currently it’s not a big deal 🤷
Issue for me too when I try to use complete deploy using
serverless deployit just works fine but when I try to deploy a single function usingserverless deploy --function myFuncI gotRequest must be smaller than 69905067 bytes for the UpdateFunctionCode operationerror. P.S. The zips generated in my case for both of these cases have an equal sizeI’m guessing this extra few MBs are to account for the fact that the data will be e.g. base64 encoded in transit. To answer your question @mnapoli - yes, the zip package can be bigger as long as the unzipped size is under 250 - at the moment if there’s a package of 100MB that will unzip to 200MB, we will support it for full deployment but not for single function deployment due to the reported limitation.