Created
July 16, 2021 16:01
-
-
Save thomaspoignant/672bf5f17b7971fb81406220a33a33a2 to your computer and use it in GitHub Desktop.
localstack SNS/SQS
This file contains hidden or 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
docker run --rm -it -p 4566:4566 -p 4571:4571 localstack/localstack | |
# create topic | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sns create-topic --name responseTopic | |
# list topic and get ARN | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sns list-topics | |
# create SQS queue | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sqs create-queue --queue-name test-queue | |
# Create SNS notification to SQS | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sns subscribe --topic-arn arn:aws:sns:us-east-1:000000000000:responseTopic --protocol sqs --notification-endpoint http://localhost:4566/000000000000/test-queue | |
# List content of the SQS queue | |
aws --region=eu-west-1 --endpoint-url=http://localhost:4566 sqs receive-message --queue-url http://localhost:4566/000000000000/test-queue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment