#!/usr/bin/bash # Triggers the lambda with a given payload. # # The payload is provided as a JSON blob through the PAYLOAD argument, # the FUNCTION_NAME should also be provided. # # PAYLOAD= FUNCTION_NAME= . script/invoke ( source $(dirname $0)/../.config cd $PROJECT_ROOT aws lambda invoke --endpoint http://localhost:9001 --no-sign-request --function-name $FUNCTION_NAME --log-type Tail --payload $PAYLOAD $FUNCTION_NAME_out.json" ) )