sqs-to-sns

module
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2023 License: MIT

README

license Go Report Card Go Reference Artifact Hub Docker Pulls

sqs-to-sns

sqs-to-sns is an utility written in Go to forward messages from AWS SQS Queues to AWS SNS Topics.

TODO

  • Forward messages.
  • Docker image.
  • Helm chart.
  • Metrics.
  • Message attributes?

Build

./build.sh

Env vars

# Mandatory
export QUEUE_URL=https://sqs.us-east-1.amazonaws.com/111111111111/queue_name
export TOPIC_ARN=arn:aws:sns:us-east-1:222222222222:topic_name

# Optional
export ROLE_ARN_SQS=arn:aws:iam::111111111111:role/sqs_consumer
export ROLE_ARN_SNS=arn:aws:iam::222222222222:role/sns_producer
export READERS=1
export WRITERS=1
export BUFFER=10
export READ_ERROR_COOLDOWN=10s
export WRITE_ERROR_COOLDOWN1=10s

Roles

You can use $ROLE_ARN_SQS to specify a role to access the source queue, and $ROLE_ARN_SNS to specify a role to access the destination topic.

The role in $ROLE_ARN_SQS must allow actions sqs:ReceiveMessage and sqs:DeleteMessage to source queue.

The role in $ROLE_ARN_SNS must allow action sns:Publish to destination topic.

Docker

Docker hub:

https://hub.docker.com/r/udhos/sqs-to-sns

Run from docker hub:

docker run -p 8080:8080 --rm udhos/sqs-to-sns:0.0.0

Build recipe:

./docker/build.sh

docker push udhos/sqs-to-sns:0.0.0

Directories

Path Synopsis
cmd
sqs-to-sns
Package main implements the program.
Package main implements the program.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL