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
Marc Cataford 494bb4d681
refactor: pure bash instead of python scripts (#9)
docs: instructions around tooling

infra: fix linting and CI
2022-09-23 01:11:41 -04:00

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"
)
)