Serverless makes corrupted .zip

Hi.

I wrote an Apollo-Lambda GraphQl server that I successfully pushed to AWS Lambda.

But since yesturday, running the serverless deploy commands generate a corrupted .zip archive. it has the right size in MO, but can’t be read by AWS (which gives my the following error:

  An error occurred: GraphqlLambdaFunction - Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 

If i try tu unzip the archive on my computed, i got one line like the following from stdout for each file in the archive:

inflating: node_modules/wss/LICENSE bad CRC 5747618f (should be 00000000)

The question is: why are the archive malformed?
thanks

2 Likes

I’m new to Serverless and experiencing the same issue when trying to deploy a function (build on MacOS Catalina).

Is there any news already?
Just found this issue:

Seems to be related to Node 15.6.0

1 Like

The argument about security is particularly funny when you know that Lambda is stuck on Node 6.12 which is a few years old and has unpatched security issues. People have been asking for a new version of Node for years now and, in typical AWS style, they don’t even bother answering or giving any type of roadmap Kodi nox.

Yeah same issue here on brand new macbook… down graded to node@14 with brew, and works.

Seems this is fixed: see Mac: aws-go-mod deploy failed Uploaded file must be a non-empty zip · Issue #8772 · serverless/serverless · GitHub