Runtime exited without providing a reason #27
Description
Describe the bug
While sample code of syncLambda runs properly. Sample code for asyncLambda: AsyncCodableLambda throws following error
aws lambda invoke --function-name HelloWorld --profile default --payload "fileb://Examples/HelloWorld/event.json" ./.build/tmp/outfile && echo "\nResult:" && cat ./.build/tmp/outfile && echo "\n"
{
"FunctionError": "Unhandled",
"ExecutedVersion": "$LATEST",
"StatusCode": 200
}
Result:
{"errorType":"Runtime.ExitError","errorMessage":"RequestId: 3278a4df-68cb-45d0-afe9-8870a675dae5 Error: Runtime exited without providing a reason"}
To Reproduce
Steps to reproduce the behavior:
Clone this repository and change following line
// sprinter.register(handler: "helloWorld", lambda: syncLambda)
// sprinter.register(handler: "helloWorld2", lambda: syncDictLambda)
// sprinter.register(handler: "helloWorld3", lambda: asyncLambda)
sprinter.register(handler: "helloWorld4", lambda: asyncDictLambda)
Inside Example/HelloWorld/Sources/HelloWorld/Main.swift
Follow all the steps to make docker build, layer, lambda from terminal
Run make invoke_lambda
Expected behavior
Sample code given in asyncDictLambda: AsyncDictionaryLambda or asyncLambda: AsyncCodableLambda should run without any error
Desktop (please complete the following information):
- OS: MacOS 10.14.4