Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sls deploy fails because of empty zip #42

Open
soniCaH opened this issue Feb 1, 2023 · 2 comments
Open

Sls deploy fails because of empty zip #42

soniCaH opened this issue Feb 1, 2023 · 2 comments

Comments

@soniCaH
Copy link

soniCaH commented Feb 1, 2023

Hey, when trying to deploy I see an empty zip gets uploaded to S3 (well, the zip is not empty, but all handler/*.js files are zero-bytes files.

image

Any idea why this is happening?

 
~/S/dynamodb-instagram ❯❯❯ sls deploy                                                                                                                  master ✱
Running "serverless" from node_modules
Serverless: Deprecation Notice: bin/serverless is deprecated, use bin/serverless.js instead
            More Info: https://www.serverless.com/framework/docs/deprecations/#BIN_SERVERLESS
Serverless: Compiling with esbuild...
Serverless: Compiling completed.
Serverless: No external modules needed
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service dynamodb-instagram.zip file to S3 (22.35 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
....................................................................................................
Serverless: Operation failed!
  An error occurred: ListFollowedByUserLambdaFunction - Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: b400602e-d20e-4ca0-9454-929987b47515)" (RequestToken: d2898624-6fff-a735-ea40-db86fe74d114, HandlerErrorCode: InvalidRequest).
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              19.4.0
     Framework Version:         1.78.1
     Plugin Version:            3.7.0
     SDK Version:               2.3.1
     Components Version:        2.34.1
@alexdebrie
Copy link
Owner

Hmm, that's really odd! Did you make any changes to the repository before deploying?

@biswajit287
Copy link

biswajit287 commented May 5, 2023

Hey, getting the same issue when deploying to aws. Have you resolved the issue?

sls deploy --aws-profile aws-biswajit
Running "serverless" from node_modules
Serverless: Deprecation Notice: bin/serverless is deprecated, use bin/serverless.js instead
More Info: https://www.serverless.com/framework/docs/deprecations/#BIN_SERVERLESS
Serverless: Compiling with esbuild...
Serverless: Compiling completed.
Serverless: No external modules needed
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service dynamodb-instagram.zip file to S3 (22.05 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.....................................................................................................
Serverless: Operation failed!
Serverless Error ---------------------------------------

An error occurred: CreateUserLambdaFunction - Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: 25864dff-eeed-44f9-ae08-c79f879d7a9b)" (RequestToken: 7443076d-57ef-2ec6-2654-0aa25543a127, HandlerErrorCode: InvalidRequest).

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com

Your Environment Information ---------------------------
Operating System: linux
Node Version: 16.18.0
Framework Version: 1.78.1
Plugin Version: 3.7.0
SDK Version: 2.3.1
Components Version: 2.34.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants