Skip to content

Mac: aws-go-mod deploy failed Uploaded file must be a non-empty zip #8772

@ifanchu

Description

@ifanchu

On my local Mac, I was trying the aws-go-mod template and sls deploy failed with

  An error occurred: HelloLambdaFunction - Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: a9d772b9-c1d9-4e74-a6ab-6be5af6feb5e; Proxy: null).
serverless.yml

I did not make any change to serverless.yml out of the template.

⚠️⚠️ REPLACE WITH FULL COMMAND NAME output
> serverless config credentials --provider provider --key key --secret secret

> sls create --template aws-go-mod --path myservice
> cd myservice
> make build
> make deploy
  Serverless Error ---------------------------------------

  An error occurred: HelloLambdaFunction - Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 5125656a-c0d3-446d-badd-bca2f7063331; Proxy: null).

Installed version

╰─➤  sls --version
Framework Core: 2.19.0
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.4.7

I also tried with sls package first then sls deploy --package, also same issue.

╰─➤  sls package --package ~/Downloads/test
Serverless: Packaging service...
Serverless: Excluding development dependencies...
╰─➤  ls -ltrh ~/Downloads/test                                                                                                                                       1 ↵
total 12512
-rw-r--r--  1 ifanchu  staff   2.0K Jan 15 23:57 cloudformation-template-create-stack.json
-rw-r--r--  1 ifanchu  staff    11K Jan 15 23:57 cloudformation-template-update-stack.json
-rw-r--r--  1 ifanchu  staff   6.1M Jan 15 23:57 myservice.zip
-rw-r--r--  1 ifanchu  staff    19K Jan 15 23:57 serverless-state.json
╰─➤  sls deploy --package ~/Downloads/test

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

  An error occurred: WorldLambdaFunction - Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 2f191f1a-2582-4d7d-8c85-1705f2384778; Proxy: null).

Am I doing anything wrong with the template?

AWS Setting

╰─➤  cat ~/.aws/config
[default]
region = us-west-2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions