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?