File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ sendRuntimeError () {
30
30
# Send successful response to Lambda API
31
31
sendResponse () {
32
32
REQUEST_ID=$1
33
- REQUEST_RESPONSE =$2
34
- curl -sS -X POST -d " $REQUEST_RESPONSE " " http://${AWS_LAMBDA_RUNTIME_API} /${RUNTIME_PATH} /invocation/${REQUEST_ID} /response" > /dev/null
33
+ REQUEST_RESPONSE_FILE =$2
34
+ cat $REQUEST_RESPONSE_FILE | curl -sS -X POST -d @- " http://${AWS_LAMBDA_RUNTIME_API} /${RUNTIME_PATH} /invocation/${REQUEST_ID} /response" > /dev/null
35
35
}
36
36
37
37
# Make sure handler file exists
76
76
EXIT_CODE=$?
77
77
# Respond to Lambda API
78
78
if [[ $EXIT_CODE -eq " 0" ]]; then
79
- sendResponse " $REQUEST_ID " " $( cat $ RESPONSE) "
79
+ sendResponse " $REQUEST_ID " " $RESPONSE "
80
80
else
81
81
# Log error to stdout as well
82
82
cat $RESPONSE
You can’t perform that action at this time.
0 commit comments