Created
April 7, 2022 17:08
-
-
Save marianobrc/785af02473806dd8150169de84bb0fda to your computer and use it in GitHub Desktop.
A script to create queues when the localstack container running SQS starts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# enable debug | |
# set -x | |
echo "Configuring SQS..." | |
echo "HOSTNAME:${HOSTNAME}" | |
echo "AWS_REGION_NAME:${AWS_REGION_NAME}" | |
create_queue() { | |
local QUEUE_NAME_TO_CREATE=$1 | |
awslocal --endpoint-url=http://${HOSTNAME}:4566 sqs create-queue --queue-name ${QUEUE_NAME_TO_CREATE} --region ${AWS_REGION_NAME} --attributes VisibilityTimeout=3600 | |
} | |
echo "Creating Queues.." | |
create_queue "default" | |
echo "Creating Queues..Done" | |
echo "Configuring SQS...Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment