19 lines
495 B
Bash
19 lines
495 B
Bash
#!/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=<json payload> FUNCTION_NAME=<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"
|
|
)
|
|
|
|
)
|