We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fcc044 commit c0cec59Copy full SHA for c0cec59
bootstrap
@@ -47,14 +47,18 @@ do
47
REQUEST_ID=$(grep -Fi Lambda-Runtime-Aws-Request-Id "$HEADERS" | tr -d '[:space:]' | cut -d: -f2)
48
# Workaround until this is a layer
49
export PATH=$PATH:/var/task/bin
50
+ # Execute the user function
51
$(echo "$_HANDLER" | cut -d. -f2) "$EVENT_DATA" >&1 2> $RESPONSE | cat
52
EXIT_CODE=$?
53
+ # Respond to Lambda API
54
if [[ $EXIT_CODE -eq "0" ]]; then
55
sendResponse "$REQUEST_ID" "$(cat $RESPONSE)"
56
else
57
+ # Log error to stdout as well
58
cat $RESPONSE
59
sendRuntimeError "$REQUEST_ID" "Exited with code $EXIT_CODE" "RuntimeErrorException" "$(cat $RESPONSE)"
60
fi
61
+ # Clean up
62
rm -f $HEADERS
63
rm -f $RESPONSE
64
done
0 commit comments