Skip to content

Commit 314b49e

Browse files
committed
code clean-up in shell scripts
1 parent 3c53f0f commit 314b49e

2 files changed

Lines changed: 1 addition & 31 deletions

File tree

sqs-lambda-ddb-sam-ts/deploy.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
# Set the stack name
1010
STACK_NAME=sqs-lambda-ddb-sam-ts
1111

12-
command -v aws >/dev/null 2>&1 || { echo >&2 "This script requires AWS CLI (https://aws.amazon.com/cli/) to be installed. Aborting."; exit 1; }
13-
command -v jq >/dev/null 2>&1 || { echo >&2 "This script requires jq (https://stedolan.github.io/jq/) to be installed. Aborting."; exit 1; }
12+
command -v sam >/dev/null 2>&1 || { echo >&2 "This script requires AWS SAM CLI (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) to be installed. Aborting."; exit 1; }
1413

1514
# Build SAM template
1615
sam build

sqs-lambda-ddb-sam-ts/test.sh

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
STACK_NAME=sqs-lambda-ddb-sam-ts
1111

1212
command -v aws >/dev/null 2>&1 || { echo >&2 "This script requires AWS CLI (https://aws.amazon.com/cli/) to be installed. Aborting."; exit 1; }
13-
command -v jq >/dev/null 2>&1 || { echo >&2 "This script requires jq (https://stedolan.github.io/jq/) to be installed. Aborting."; exit 1; }
1413

1514
# Get CloudFront QueueURL output value
1615
queue=$(aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].Outputs[?OutputKey=='QueueURL'].OutputValue" --output text)
@@ -21,31 +20,3 @@ for ((i=0; i<5; i++)); do
2120
--entries file://messages.json \
2221
--no-cli-pager
2322
done
24-
25-
# ----------------
26-
27-
# #send $TOTAL_MESSAGES to SQS queue
28-
# for ((i=0; i<1; i++)); do
29-
30-
# messages=()
31-
32-
# for ((j=0; j<1; j++)); do
33-
# # messages+=("{\"id\": \"$(i*10+j)\", \"message\": \"Message $i\", \"payload\": \"$(printf '%*s' 4000 | tr ' ' '#')\"}")
34-
# # id=$((i*10+j))
35-
# # messages+=("{\"Id\": \"test-message-$id\", \"MessageBody\": \"{\"id\": \"$id\", \"message\": \"Message $id\"}\"}")
36-
# # body="{\\\"id\\\": \\\"$id\\\", \\\"message\\\": \\\"Message $id\\\"}"
37-
# # entry="{\"Id\": \"test-message-$id\", \"MessageBody\": \"$body\"}"
38-
# # echo $entry
39-
# # messages+=("{\"Id\": \"test-message-$id\", \"MessageBody\": \"$(printf '%q' $body)\"}")
40-
# echo "{\"id\": \"$(i*10+j)\", \"message\": \"Message $i\", \"payload\": \"$(printf '%*s' 4000 | tr ' ' '#')\"}"
41-
# done
42-
43-
# json_message=$(echo ${messages[@]} | jq -s .)
44-
45-
# echo "Sending ${json_message} messages..."
46-
47-
# # aws sqs send-message \
48-
# # --queue-url "$queue" \
49-
# # --message-body "$json_message"
50-
51-
# done

0 commit comments

Comments
 (0)