Fluent output plugin to send messages to Amazon SNS.
fluent-plugin-amazon_sns | Fluentd | Ruby |
---|---|---|
>= 0.1.0 | >= v0.14.15 | >= 2.1 |
< 0.1.0 | >= v0.10.0 | >= 1.9 |
gem install fluent-plugin-amazon_sns
<match sns.**>
type amazon_sns
flush_interval 1s
# Optional if you have AWS_* environment variables set up (via IAM Role etc.)
aws_access_key_id AWS_ACCESS_KEY_ID
aws_secret_access_key AWS_SECRET_ACCESS_KEY
aws_region AWS_REGION # (e.g. ap-northeast-1)
# One of the following options must be enabled to map topics
## 1) Fixed string
topic_name MyTopic
## 2) Map fluent tags
## sns.App.MyTopic -> 'App-MyTopic'
topic_map_tag true
remove_tag_prefix sns
## 3) Map fluent message key
## maps 'topic' key in the message
topic_map_key topic
# SNS Message Subject, either fixed string or map message key
subject SUBJECT_STRING
subject_key SUBJECT_KEY
</match>
- Topic names are dynamically configurable, rather than static
- Buffered output
- Fork it ( http://github.com//fluent-plugin-amazon_sns/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Tatsuhiko Miyagawa
The code is heavily inspired by: ixixi/fluent-plugin-sns and norikra/fluent-plugin-norikra.