GithubHelp home page GithubHelp logo

ssense / sqspush Goto Github PK

View Code? Open in Web Editor NEW
2.0 6.0 0.0 11 KB

Simple cli command that push STDIN to your AWS SQS queue

License: MIT License

Makefile 21.06% Go 78.94%
aws sqs sqs-cli sqs-queue golang

sqspush's Introduction

SQS Push

Build Status

simple cli command that push STDIN to your AWS SQS queue


Install

Binary packages are available for Mac, Linux and Windows.

To build from source you can:

  1. Clone this repository into $GOPATH/src/github.com/SSENSE/sqspush and change directory into it
  2. Run make build

This will leave you with ./sqspush, which you can put in your $PATH if you'd like. (You can also take a look at make install to install for you.)

Usage

# login to AWS
sqspush login --key=aws_access_key_id --secret=aws_secret_access_key

# Send payload.json to your queue
cat ./mock/payload.json | sqspush --queue=https://sqs.us-west-2.amazonaws.com/XXYYYZZZZXXX/queue-name.fifo --region=us-west-2 --group=mygroup

# or use echo to send data
echo '{ "foo": "bar" }' | sqspush --queue=https://sqs.us-west-2.amazonaws.com/XXYYYZZZZXXX/queue-name --region=us-west-2 --group=mygroup

# Getting help
sqspush --help
# NAME:
#    SQS PUSH - push stdin into sqs queue
# USAGE:
#    cat ./payload.json | sqspush [global options] command [command options] [arguments...]
#
# COMMANDS:
#    login, l  login aws credentials
#    help, h   Shows a list of commands or help for one command
#
# GLOBAL OPTIONS:
#    --cred-path value, -c value  AWS credentials path (default: "~/.aws/credentials")
#    --queue value, -q value      SQS queue URL
#    --region value, -r value     SQS queue REGION
#    --profile value, -p value    AWS login profile
#    --retries value              SQS queue retries (default: 2)
#    --group value, -g value      SQS queue MessageGroupId (default: "5ePlmiO61JA5iqU1jBkjLYv2Xp4=")
#    --help, -h                   show help
#    --version, -v                print the version

Configuring Credentials

Before using the SQS PUSH, ensure that you've configured credentials. The best way to configure credentials on a development machine is to use the ~/.aws/credentials file, which might look like:

[default]
aws_access_key_id = AKID1234567890
aws_secret_access_key = MY-SECRET-KEY

or use SQS PUSH login command to create your ~/.aws/credentials

# login to AWS will create or overwrite ~/.aws/credentials file
sqspush login --key=aws_access_key_id --secret=aws_secret_access_key

LICENSE

This package is made available under an MIT-style license. See LICENSE.txt.

sqspush's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.