Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
Update README.MD
Browse files Browse the repository at this point in the history
  • Loading branch information
mercury2269 authored Jun 21, 2020
1 parent c842c2c commit 550e517
Showing 1 changed file with 53 additions and 56 deletions.
109 changes: 53 additions & 56 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,44 @@
* 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.

## Getting Started
## 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.

### Prerequisites
**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`

```sh
$ 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`:
```sh
$ curl https://raw.githubusercontent.com/mercury2269/sqsmover/master/install.sh | sudo sh
```

**Manually**:

Download the pre-compiled binary from the [releases page](https://github.com/mercury2269/sqsmover/releases) and
copy to the desired location.

## Set up AWS credentials

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

#### Creating the Credentials File
### 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.

Expand All @@ -44,7 +72,7 @@ Optionally you can configure default region in `~/.aws/config`
region=us-west-2
```

#### Environment variables
### Option 2: Environment variables

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

Expand All @@ -63,59 +91,9 @@ set AWS_ACCESS_KEY_ID=YOUR_AKID
set AWS_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
```

### Installing

**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`

```sh
$ 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`:
```sh
$ curl https://raw.githubusercontent.com/mercury2269/sqsmover/master/install.sh | sudo sh
```

**Manually**:

Download the pre-compiled binary from the [releases page](https://github.com/mercury2269/sqsmover/releases) and
copy to the desired location.

### Compiling from source

You will need to have [Golang installed](https://golang.org/doc/install).

```sh
# 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
```


## Usage

```
```bash
sqsmover --help

usage: sqsmover --source=SOURCE --destination=DESTINATION [<flags>]
Expand Down Expand Up @@ -160,4 +138,23 @@ in a batch exceeds 256kb (262,144 bytes) you will receive an error: `Batch reque
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](https://golang.org/doc/install).

```sh
# 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
```

0 comments on commit 550e517

Please sign in to comment.