hubot-sqs
Send AWS SQS messages to Hubot
Last updated 3 years ago by contolini .
CC0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hubot-sqs 
SYNC missed versions from official npm registry.

hubot-sqs Build Status npm

:cat: Send AWS SQS messages to Hubot

See src/sqs.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-sqs --save

Then add hubot-sqs to your external-scripts.json:

["hubot-sqs"]

Configuration

HUBOT_AWS_SQS_QUEUE_URL

You have to specify the queue URL to pull commands from.

e.g.: https://sqs.us-east-1.amazonaws.com/XXXXXXXXXXXXX/hubot-queue

HUBOT_AWS_SQS_ACCESS_KEY_ID, HUBOT_AWS_SQS_SECRET_ACCESS_KEY

Your AWS account's access key ID and secret access key.

HUBOT_AWS_SQS_REGION

You can configure the region of SQS with HUBOT_AWS_SQS_REGION, which defaults to us-east-1.

Commands

The SQS messages needs to be in the following JSON format:

{
    "MessageBody": "What's up?!",
    "MessageAttributes": {
        "user": {
            "DataType": "String",
            "StringValue": "CFPBot"
        },
        "room": {
            "DataType": "String",
            "StringValue": "off-topic"
        }
    }
}

Assuming the above JSON is in a file called message.json, it can be sent to SQS using the command:

aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/XXXXXXXXXXXXX/hubot-queue --cli-input-json file://message.json

Hubot will receive the message and post it to the specified room.

Original author

Tatsuhiko Miyagawa (check out hubot-incoming-sqs)

Contributing

Please read our general contributing guidelines.

Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Current Tags

  • 1.3.0                                ...           latest (3 years ago)

4 Versions

  • 1.3.0                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |