sqsedit

This is a community-maintained plugin!

Push events to an Amazon Web Services Simple Queue Service (SQS) queue.

SQS is a simple, scalable queue system that is part of the Amazon Web Services suite of tools.

Although SQS is similar to other queuing systems like AMQP, it uses a custom API and requires that you have an AWS account. See http://aws.amazon.com/sqs/ for more details on how SQS works, what the pricing schedule looks like and how to setup a queue.

To use this plugin, you must:

  • Have an AWS account
  • Setup an SQS queue
  • Create an identify that has access to publish messages to the queue.

The "consumer" identity must have the following permissions on the queue:

  • sqs:ChangeMessageVisibility
  • sqs:ChangeMessageVisibilityBatch
  • sqs:GetQueueAttributes
  • sqs:GetQueueUrl
  • sqs:ListQueues
  • sqs:SendMessage
  • sqs:SendMessageBatch

Typically, you should setup an IAM policy, create a user and apply the IAM policy to the user. A sample policy is as follows:

     {
       "Statement": [
         {
           "Sid": "Stmt1347986764948",
           "Action": [
             "sqs:ChangeMessageVisibility",
             "sqs:ChangeMessageVisibilityBatch",
             "sqs:DeleteMessage",
             "sqs:DeleteMessageBatch",
             "sqs:GetQueueAttributes",
             "sqs:GetQueueUrl",
             "sqs:ListQueues",
             "sqs:ReceiveMessage"
           ],
           "Effect": "Allow",
           "Resource": [
             "arn:aws:sqs:us-east-1:200850199751:Logstash"
           ]
         }
       ]
     }

See http://aws.amazon.com/iam/ for more details on setting up AWS identities.

 

Synopsisedit

This plugin supports the following configuration options:

Required configuration options:

sqs {
    queue => ...
}

Available configuration options:

SettingInput typeRequiredDefault value

access_key_id

string

No

 

aws_credentials_file

string

No

 

batch

boolean

No

true

batch_events

number

No

10

batch_timeout

number

No

5

codec

codec

No

"plain"

proxy_uri

string

No

 

queue

string

Yes

 

region

string, one of ["us-east-1", "us-west-1", "us-west-2", "eu-central-1", "eu-west-1", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "sa-east-1", "us-gov-west-1", "cn-north-1"]

No

"us-east-1"

secret_access_key

string

No

 

session_token

string

No

 

use_ssl

boolean

No

true

workers

number

No

1

Detailsedit

 

access_key_idedit

  • Value type is string
  • There is no default value for this setting.

aws_credentials_fileedit

  • Value type is string
  • There is no default value for this setting.

batchedit

  • Value type is boolean
  • Default value is true

Set to true if you want send messages to SQS in batches with batch_send from the amazon sdk

batch_eventsedit

  • Value type is number
  • Default value is 10

If batch is set to true, the number of events we queue up for a batch_send.

batch_timeoutedit

  • Value type is number
  • Default value is 5

If batch is set to true, the maximum amount of time between batch_send commands when there are pending events to flush.

codecedit

  • Value type is codec
  • Default value is "plain"

The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output, without needing a separate filter in your Logstash pipeline.

proxy_uriedit

  • Value type is string
  • There is no default value for this setting.

queueedit

  • This is a required setting.
  • Value type is string
  • There is no default value for this setting.

Name of SQS queue to push messages into. Note that this is just the name of the queue, not the URL or ARN.

regionedit

  • Value can be any of: us-east-1, us-west-1, us-west-2, eu-central-1, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1, us-gov-west-1, cn-north-1
  • Default value is "us-east-1"

secret_access_keyedit

  • Value type is string
  • There is no default value for this setting.

session_tokenedit

  • Value type is string
  • There is no default value for this setting.

use_ssledit

  • Value type is boolean
  • Default value is true

workersedit

  • Value type is number
  • Default value is 1

The number of workers to use for this output. Note that this setting may not be useful for all outputs.