Resource handler returned message: Uploaded file must be a non-empty zip

service: c1-pagerduty-logs-to-splunk

plugins:
  - serverless-offline-ssm

provider:
  name: aws

custom:
  serverless-offline-ssm:
    stages:
      -local

functions:
  pagerduty_to_dynamodb:
    name: pagerduty_to_dynamodb
    handler: lambda.pagerduty_to_dynamodb.lambda_handler
    runtime: python3.8
    timeout: 900
    memorySize: 1024
    package:
      include:
        - lambda/__init__.py
        - lambda/pagerduty_to_dynamodb.py
    events:
      - schedule:
          rate: rate(24 hours)
  pagerduty_logs_dumper:
    name: pagerduty_logs_dumper
    handler: lambda.pagerduty_logs_dumper.lambda_handler
    runtime: python3.8
    timeout: 900
    memorySize: 1024
    package:
      include:
        - lambda/__init__.py
        - lambda/pagerduty_logs_dumper.py
    events:
      - schedule:
          rate: rate(24 hours)

Resources:
  ${file(./resources/dynamodb/dynamo.yml)}

This is the serverless.yml that I have created but when I run serverless deploy using nodejs 18.8.0 and serverless 2.19 I get (An error occurred: PagerdutyUnderscoretoUnderscoredynamodbLambdaFunction - Resource handler returned message: “Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: ef8bcd45-7949-447b-a816-5056e2b0a730)” (RequestToken: b49fdbce-0b55-bc81-0c71-c77dbbfe797d, HandlerErrorCode: InvalidRequest).) I have tried looking online were people have recommended using a different version of node js but I get the exact same error. Did I do something wrong in my code that I am just not seeing?

If you run “sls package”, and look in the .serverless folder, is there a .zip file there ? How large is it ? What’s in it ?

Sorry I forgot to post here that I found the answer yesterday. It seems that using version 14.20 of nodejs fixed the issue. I didn’t have to change any of my code