We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3e1d09 + 2e781c6 commit ba45d5eCopy full SHA for ba45d5e
sample-apps/blank-csharp/3-invoke.sh
@@ -1,9 +1,9 @@
1
#!/bin/bash
2
set -eo pipefail
3
FUNCTION=$(aws cloudformation describe-stack-resource --stack-name blank-csharp --logical-resource-id function --query 'StackResourceDetail.PhysicalResourceId' --output text)
4
-
+if [[ $(aws --version) =~ "aws-cli/2." ]]; then PAYLOAD_PROTOCOL="fileb"; else PAYLOAD_PROTOCOL="file"; fi;
5
while true; do
6
- aws lambda invoke --function-name $FUNCTION --payload file://event.json out.json
+ aws lambda invoke --function-name $FUNCTION --payload $PAYLOAD_PROTOCOL://event.json out.json
7
cat out.json
8
echo ""
9
sleep 2
0 commit comments