aws-mq-cleaner is a tool to remove unused SQS queues and SNS topics.
We're getting the metrics from Cloudwatch.
If NumberOfMessagesReceived and NumberOfEmptyReceipts are set to zero, we're considering the queue to be unused.
If subscriptionsConfirmed and subscriptionsPending are at zero, we're considering the topic to be unused.
NOTE: You can add a tag to read an "update date" to prevent a topic without subscriptions to be deleted. The tag name is configurable, you can define it via the Docs. The tag format shall be in ISO-8601.
docker pull habx/aws-mq-cleaner
docker container run --rm habx/aws-mq-cleaner --helpSet VERSION
VERSION=vx.x.x wget https://github.com/habx/aws-mq-cleaner/releases/download/${VERSION}/aws-mq-cleaner_darwin_amd64.gzVERSION=vx.x.x wget https://github.com/habx/aws-mq-cleaner/releases/download/${VERSION}/aws-mq-cleaner_linux_amd64.gzgo get -t github.com/habx/aws-mq-cleaner
aws-mq-cleaner --help