All Projects → mercury2269 → Sqsmover

mercury2269 / Sqsmover

Licence: apache-2.0
AWS SQS Message mover

Programming Languages

shell
77523 projects
golang
3204 projects

Labels

Projects that are alternatives of or similar to Sqsmover

Assert cli
See instead assert_cmd
Stars: ✭ 150 (-2.6%)
Mutual labels:  cli
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (-1.3%)
Mutual labels:  cli
Pully
A simple CLI and library for downloading high quality YouTube videos!
Stars: ✭ 153 (-0.65%)
Mutual labels:  cli
Multiprocess
🚀Easy to make the common PHP/Python/js...script change daemon and multi-process execution
Stars: ✭ 151 (-1.95%)
Mutual labels:  cli
Defopt
Effortless argument parser
Stars: ✭ 150 (-2.6%)
Mutual labels:  cli
Simplesh
🐧 Quick installation for Ubuntu terminal.
Stars: ✭ 152 (-1.3%)
Mutual labels:  cli
Envy
Envy automatically exposes environment variables for all of your Go flags
Stars: ✭ 150 (-2.6%)
Mutual labels:  cli
Cbox
convert any python function to unix-style command
Stars: ✭ 154 (+0%)
Mutual labels:  cli
Deno Cliffy
Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Stars: ✭ 149 (-3.25%)
Mutual labels:  cli
Gloria
Gloria is a static website generator, based on NodeJS.
Stars: ✭ 153 (-0.65%)
Mutual labels:  cli
Ffpb
A progress bar for ffmpeg. Yay !
Stars: ✭ 149 (-3.25%)
Mutual labels:  cli
Gitin
commit/branch/workdir explorer for git
Stars: ✭ 1,815 (+1078.57%)
Mutual labels:  cli
Go Audio
An offline solution to convert pdfs into audiobooks
Stars: ✭ 153 (-0.65%)
Mutual labels:  cli
Athenacli
AthenaCLI is a CLI tool for AWS Athena service that can do auto-completion and syntax highlighting.
Stars: ✭ 151 (-1.95%)
Mutual labels:  cli
React Native Rename
Rename react-native app with just one command
Stars: ✭ 2,033 (+1220.13%)
Mutual labels:  cli
Xcassetpacker
A command line tool for converting a folder of images into an .xcasset package for Xcode
Stars: ✭ 150 (-2.6%)
Mutual labels:  cli
Grafcli
Grafana CLI for quick and easy dashboards management.
Stars: ✭ 152 (-1.3%)
Mutual labels:  cli
Tsrc
Manage groups of git repositories
Stars: ✭ 154 (+0%)
Mutual labels:  cli
Aeneas
aeneas is a Python/C library and a set of tools to automagically synchronize audio and text (aka forced alignment)
Stars: ✭ 1,942 (+1161.04%)
Mutual labels:  cli
Sherlock Js
Find usernames across over 170 social networks - Fast & flexible remake of sdushantha/sherlock
Stars: ✭ 153 (-0.65%)
Mutual labels:  cli

SQS Message Mover

Go Report Card GitHub

sqsmover is a tool for moving AWS SQS messages from one queue to another. Useful when you need to move deadletter queue messages back into the original queue.

sqs-mover-intro

Features

  • Reliable delivery. SQS Mover will only delete messages from the source queue after they were enqueued to the destination.
  • Receives and sends messages in batches for faster processing.
  • Progress indicator.
  • User friendly info and error messages.
  • Queue name resolution. For ease of use, you only need to provide a queue name and not the full arn address.
  • Message attributes copy.
  • Support for FIFO queues. MessageGroupId and MessageDeduplicationId are copied over to the destination messages.
  • An optional flag to limit the number of messages to move.

Installing

SQS Mover is pre-compiled for macOS, Linux, Windows and does not require additional dependencies. You can install the pre-compiled binary (in several different ways) or compile from source.

homebrew tap (only on macOS for now):

brew install mercury2269/homebrew-tap/sqsmover

Chocolatey (Windows)

choco install sqsmover

Shell script:

The following script will install the binary into /usr/local/bin

$ curl https://raw.githubusercontent.com/mercury2269/sqsmover/master/install.sh | sh

Note that you may need to run the sudo version below, or alternatively chown /usr/local/bin:

$ curl https://raw.githubusercontent.com/mercury2269/sqsmover/master/install.sh | sudo sh

From Source

Download:

git clone [email protected]:mercury2269/sqsmover.git && cd sqsmover

Run:

AWS_PROFILE=nbos-ris AWS_REGION=us-west-2 go run main.go --source transactions-dlq --destination transactions

Manually:

Download the pre-compiled binary from the releases page and copy to the desired location.

Set up AWS credentials

Specifying AWS credentials in either a shared credentials file or environment variables.

Option 1: Creating the Credentials File

If you don’t have a shared credentials file (~/.aws/credentials), you can use any text editor to create one in your home directory. Add the following content to your credentials file, replacing <YOUR_ACCESS_KEY_ID> and <YOUR_SECRET_ACCESS_KEY> with your credentials.

[default]
aws_access_key_id = <YOUR_ACCESS_KEY_ID>
aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>

The [default] heading defines credentials for the default profile, which the SQSMover will use unless you configure it to use another profile.

Optionally you can configure default region in ~/.aws/config

[default]
region=us-west-2

Option 2: Environment variables

As an alternative, you can setup AWS credentials in the environment variables.

The following examples show how to configure the environment variables.

Linux, OS X, or Unix

export AWS_ACCESS_KEY_ID=YOUR_AKID
export AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY

Windows

set AWS_ACCESS_KEY_ID=YOUR_AKID
set AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY

Usage

sqsmover --help

usage: sqsmover --source=SOURCE --destination=DESTINATION [<flags>]

Flags:
  -h, --help                     Show context-sensitive help (also try
                                 --help-long and --help-man).
  -s, --source=SOURCE            The source queue name to move messages from.
  -d, --destination=DESTINATION  The destination queue name to move messages to.
  -r, --region="us-west-2"       The AWS region for source and destination queues.
  -p, --profile=""               Use a specific profile from AWS credentials file.
  -l, --limit=0                  Limits total number of messages moved. No limit is set by default.
  -b, --batch=10                 The maximum number of messages to move at a time.
  -v, --version                  Show application version.

Examples:

Region will default to us-west-2, you can also override it with --region flag

sqsmover --source=my_source_queue_name --destination=my_destination_queuename
sqsmover --source=my_source_queue_name --destination=my_destination_queuename --region=eu-west-1

-- shorthand
sqsmover -s my_source_queue_name -d my_destination_queuename -r eu-west-1

Profile will default to Default, you can also override it with --profile flag

sqsmover --source=my_source_queue_name --destination=my_destination_queuename --profile=user

Limit number of moved messages to 10

sqsmover -s my_source_queue_name -d my_destination_queuename -l 10

By default, sqsmover will try to move 10 messages at a time. However, if the total size of messages in a batch exceeds 256kb (262,144 bytes) you will receive an error: Batch requests cannot be longer than 262144 bytes. You have sent x bytes. To resolve, reduce the batch size by setting -b flag.

sqsmover -s my_source_queue_name -d my_destination_queuename -b 3

Compiling from source

You will need to have Golang installed.

# clone it outside GOPATH
git clone https://github.com/mercury2269/sqsmover
cd sqsmover

# get dependencies using go modules (needs go 1.11+)
go get ./...

# build
go build -o sqsmover .

# check it works
./sqsmover --version
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].