Skip to content

Commit ba45d5e

Browse files
authored
Merge pull request #290 from Calkines/main
fix: use payload file protocol accordingly Aws Cli version
2 parents e3e1d09 + 2e781c6 commit ba45d5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sample-apps/blank-csharp/3-invoke.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
set -eo pipefail
33
FUNCTION=$(aws cloudformation describe-stack-resource --stack-name blank-csharp --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
4-
4+
if [[ $(aws --version) =~ "aws-cli/2." ]]; then PAYLOAD_PROTOCOL="fileb"; else PAYLOAD_PROTOCOL="file"; fi;
55
while true; do
6-
aws lambda invoke --function-name $FUNCTION --payload file://event.json out.json
6+
aws lambda invoke --function-name $FUNCTION --payload $PAYLOAD_PROTOCOL://event.json out.json
77
cat out.json
88
echo ""
99
sleep 2

0 commit comments

Comments
 (0)