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 () {
3030# Send successful response to Lambda API
3131sendResponse () {
3232 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
3535}
3636
3737# Make sure handler file exists
7676 EXIT_CODE=$?
7777 # Respond to Lambda API
7878 if [[ $EXIT_CODE -eq " 0" ]]; then
79- sendResponse " $REQUEST_ID " " $( cat $ RESPONSE) "
79+ sendResponse " $REQUEST_ID " " $RESPONSE "
8080 else
8181 # Log error to stdout as well
8282 cat $RESPONSE
You can’t perform that action at this time.
0 commit comments