3-invoke.sh - AWS Code Sample

3-invoke.sh

#!/bin/bash set -eo pipefail FUNCTION=$(aws cloudformation describe-stack-resource --stack-name blank-powershell --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text) while true; do aws lambda invoke --function-name $FUNCTION --payload file://event.json out.json cat out.json echo "" sleep 2 done