This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
lambda-boilerplate/script/invoke

20 lines
495 B
Text
Raw Normal View History

#!/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"
)
)