🐱 Send AWS SQS messages to Hubot
See src/sqs.coffee
for full documentation.
In hubot project repo, run:
npm install hubot-sqs --save
Then add hubot-sqs to your external-scripts.json
:
["hubot-sqs"]
You have to specify the queue URL to pull commands from.
e.g.: https://sqs.us-east-1.amazonaws.com/XXXXXXXXXXXXX/hubot-queue
Your AWS account's access key ID and secret access key.
You can configure the region of SQS with HUBOT_AWS_SQS_REGION, which defaults to us-east-1
.
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.
Tatsuhiko Miyagawa (check out hubot-incoming-sqs)
Please read our general contributing guidelines.