Open fedevilensky opened 1 year ago
I am having the same problem on MacOS.
My YAML file:
plugins:
- serverless-offline
service: abc
app: abc
org: codedge
frameworkVersion: "3"
provider:
name: aws
runtime: go1.x
package:
patterns:
- "!./**"
- ./bin/**
functions:
airmail:
handler: bin/abc
events:
- httpApi:
path: /
method: post
Error
{
"errorMessage": "[504] - Lambda timeout.",
"errorType": "LambdaTimeoutError",
"stackTrace": [
"Error: [504] - Lambda timeout.",
"at #timeoutAndTerminate (file:///Users/holger/code/hedge10/airmail-infra/node_modules/serverless-offline/src/lambda/LambdaFunction.js:283:11)",
"at async LambdaFunction.runHandler (file:///Users/holger/code/hedge10/airmail-infra/node_modules/serverless-offline/src/lambda/LambdaFunction.js:305:16)",
"at async file:///Users/holger/code/hedge10/airmail-infra/node_modules/serverless-offline/src/events/http/HttpServer.js:602:18",
"at async exports.Manager.execute (/Users/holger/code/hedge10/airmail-infra/node_modules/@hapi/hapi/lib/toolkit.js:60:28)",
"at async internals.handler (/Users/holger/code/hedge10/airmail-infra/node_modules/@hapi/hapi/lib/handler.js:46:20)",
"at async exports.execute (/Users/holger/code/hedge10/airmail-infra/node_modules/@hapi/hapi/lib/handler.js:31:20)",
"at async Request._lifecycle (/Users/holger/code/hedge10/airmail-infra/node_modules/@hapi/hapi/lib/request.js:370:32)"
]
}
i had same issue and the solution was to set much bigger timeout
for lambdas. Looks like the timeout blocks pulling docker image.
Bug Report
Current Behavior When I run
sls offline --useDocker start
Lambda times out, because it does not launch docker containers, errors out with the following messageExpected behavior/code
The docker containers start automatically and the lamdas don't timeout
Environment
serverless
version: 3.27.0serverless-offline
version: ^12.0.4,go
version: 1.20.1OS
: Arch 6.1.12-arch1-1