fluent-plugin-kinesis 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 529a0b5277cab5b82c165d2eaa4339c529381a17
4
- data.tar.gz: fcc5161078a9311d511c5ecb95d4d2dfd9f078e4
3
+ metadata.gz: 2390ce24f4d7b54d0271ae6c7f4e90814961aa8b
4
+ data.tar.gz: 0101a6e0685efb9dfdfb58f78634ebcdf4b75b6c
5
5
  SHA512:
6
- metadata.gz: 05661c7aa7080a5e693d58f4d16a07bbeb8f426bbddefacc7fcce78dfe411f098f1829ffd9bf0c5e253b79419605a00d49c1baf44248512e9f6190e97e8c4c1f
7
- data.tar.gz: 7c4530a60cc37bbef7ca85559a07b0fee5038be2d84c195fd68900a7dba73485ae5b2d29aec1f0b585185a160f4317dc111a190951899a0451437b5978d96764
6
+ metadata.gz: 021a67078235969418ad03f166a3ffeafdb4559f1893828dfee7b7eaf4b4bd27b591c63729a1ee664a3a9b101422f638ec328454227f8b8f81eb77907ac21a2d
7
+ data.tar.gz: 86aac9dbe4fe9647659989d3e6591ecf350bf60b503352cbdde722f1131ac03e7c8d455124b47fb0e67b23b09c5b0a01fedcc3259a2691cdd2fd28183ef31d25
@@ -4,14 +4,16 @@ sudo: false
4
4
 
5
5
  gemfile:
6
6
  - Gemfile
7
- - gemfiles/Gemfile.td-agent-3.3.0
7
+ - gemfiles/Gemfile.td-agent-3.5.0
8
8
 
9
9
  # Test with supported td-agent versions
10
10
  # https://support.treasuredata.com/hc/en-us/articles/360001479187-The-td-agent-ChangeLog
11
11
  matrix:
12
12
  include:
13
13
  - rvm: 2.4.1
14
- gemfile: gemfiles/Gemfile.fluentd-0.14.10
14
+ gemfile: gemfiles/Gemfile.fluentd-0.14.22
15
+ - rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/config/projects/td-agent3.rb#L20
16
+ gemfile: gemfiles/Gemfile.td-agent-3.1.0
15
17
  - rvm: 2.4.2 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.1/config/projects/td-agent3.rb#L17
16
18
  gemfile: gemfiles/Gemfile.td-agent-3.1.1
17
19
  - rvm: 2.4.4 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.2.0/config/projects/td-agent3.rb#L22
@@ -20,6 +22,10 @@ matrix:
20
22
  gemfile: gemfiles/Gemfile.td-agent-3.2.1
21
23
  - rvm: 2.4.5 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.3.0/config/projects/td-agent3.rb#L22
22
24
  gemfile: gemfiles/Gemfile.td-agent-3.3.0
25
+ - rvm: 2.4.6 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/config/projects/td-agent3.rb#L22
26
+ gemfile: gemfiles/Gemfile.td-agent-3.4.1
27
+ - rvm: 2.4.6 # https://github.com/treasure-data/omnibus-td-agent/blob/v3.5.0/config/projects/td-agent3.rb#L22
28
+ gemfile: gemfiles/Gemfile.td-agent-3.5.0
23
29
  fast_finish: true
24
30
 
25
31
  script: bundle exec rake test
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.2.0
4
+
5
+ - Feature - Add placeholder support for stream names to send records to multiple streams : [#165](https://github.com/awslabs/aws-fluent-plugin-kinesis/issues/165) [#174](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/174)
6
+ - Enhancement - Add sts_endpoint_url configuration parameter to support AWS STS regional endpoints : [#186](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/186)
7
+ - Enhancement - Add aws_ses_token configuration parameter to use IAM with MFA and directly provided temporary credentials : [#166](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/166)
8
+ - Dependency - Update gem dependency to Ruby 2.3.0+ and Fluentd 0.14.22+
9
+ - Bug - Fix dependency problem on AWS SDK with td-agent v3.4.1
10
+
3
11
  ## 3.1.0
4
12
 
5
13
  - Feature - Add process_credentials configuration : [#178](https://github.com/awslabs/aws-fluent-plugin-kinesis/pull/178)
data/README.md CHANGED
@@ -3,9 +3,10 @@
3
3
  [![Gitter](https://badges.gitter.im/awslabs/aws-fluent-plugin-kinesis.svg)](https://gitter.im/awslabs/aws-fluent-plugin-kinesis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4
4
  [![Build Status](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis.svg?branch=master)](https://travis-ci.org/awslabs/aws-fluent-plugin-kinesis)
5
5
  [![Gem Version](https://badge.fury.io/rb/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
6
+ [![Gem Downloads](https://img.shields.io/gem/dt/fluent-plugin-kinesis.svg)](https://rubygems.org/gems/fluent-plugin-kinesis)
6
7
 
7
8
  [Fluentd][fluentd] output plugin
8
- that sends events to [Amazon Kinesis Data Streams][streams] and [Amazon Kinesis Data Firehose][firehose]. Also it supports [KPL Aggregated record format][kpl]. This gem includes three output plugins respectively:
9
+ that sends events to [Amazon Kinesis Data Streams][streams] and [Amazon Kinesis Data Firehose][firehose]. Also it supports [KPL Aggregated Record Format][kpl]. This gem includes three output plugins respectively:
9
10
 
10
11
  - `kinesis_streams`
11
12
  - `kinesis_firehose`
@@ -24,7 +25,7 @@ Or you can install this plugin for [td-agent][td-agent] as:
24
25
 
25
26
  td-agent-gem install fluent-plugin-kinesis
26
27
 
27
- If you would like to build by yourself and install, please see the section below. Your need [bundler][bundler] for this.
28
+ If you would like to build by yourself and install, see the section below. Your need [bundler][bundler] for this.
28
29
 
29
30
  In case of using with Fluentd: Fluentd will be also installed via the process below.
30
31
 
@@ -50,8 +51,8 @@ Or just download specify your Ruby library path. Below is the sample for specify
50
51
  export RUBYLIB=$RUBYLIB:/path/to/aws-fluent-plugin-kinesis/lib
51
52
 
52
53
  ## Dependencies
53
- * Ruby 2.1.0+
54
- * Fluentd 0.14.10+
54
+ * Ruby 2.3.0+
55
+ * Fluentd 0.14.22+ (td-agent v3.1.0+)
55
56
 
56
57
  ## Basic Usage
57
58
  Here are general procedures for using this plugin:
@@ -82,7 +83,7 @@ Assume you use Amazon EC2 instances with Instance profile. If you want to use sp
82
83
  stream_name your_stream
83
84
  partition_key key # Otherwise, use random partition key
84
85
  </match>
85
- For more detail, see [Configuration: kinesis_streams](#configuration-kinesis_streams)
86
+ For more details, see [Configuration: kinesis_streams](#configuration-kinesis_streams).
86
87
 
87
88
  ### kinesis_firehose
88
89
  <match your_tag>
@@ -90,7 +91,7 @@ For more detail, see [Configuration: kinesis_streams](#configuration-kinesis_str
90
91
  region us-east-1
91
92
  delivery_stream_name your_stream
92
93
  </match>
93
- For more detail, see [Configuration: kinesis_firehose](#configuration-kinesis_firehose)
94
+ For more details, see [Configuration: kinesis_firehose](#configuration-kinesis_firehose).
94
95
 
95
96
  ### kinesis_streams_aggregated
96
97
  <match your_tag>
@@ -100,10 +101,10 @@ For more detail, see [Configuration: kinesis_firehose](#configuration-kinesis_fi
100
101
  # Unlike kinesis_streams, there is no way to use dynamic partition key.
101
102
  # fixed_partition_key or random.
102
103
  </match>
103
- For more detail, see [Configuration: kinesis_streams_aggregated](#configuration-kinesis_streams_aggregated)
104
+ For more details, see [Configuration: kinesis_streams_aggregated](#configuration-kinesis_streams_aggregated).
104
105
 
105
106
  ### For better throughput
106
- Add configuration like below:
107
+ Add configurations like below:
107
108
 
108
109
  flush_interval 1
109
110
  chunk_limit_size 1m
@@ -111,12 +112,14 @@ Add configuration like below:
111
112
  flush_thread_burst_interval 0.01
112
113
  flush_thread_count 15
113
114
 
115
+ When you use Fluent v1.0 (td-agent3), write these configurations in buffer section. For more details, see [Config: Buffer Section][fluentd-buffer-section].
116
+
114
117
  Note: Each value should be adjusted to your system by yourself.
115
118
 
116
119
  ## Configuration: Credentials
117
120
  To put records into Amazon Kinesis Data Streams or Firehose, you need to provide AWS security credentials somehow. Without specifying credentials in config file, this plugin automatically fetch credential just following AWS SDK for Ruby does (environment variable, shared profile, and instance profile).
118
121
 
119
- This plugin uses the same configuration in [fluent-plugin-s3][fluent-plugin-s3].
122
+ This plugin uses the same configuration in [fluent-plugin-s3][fluent-plugin-s3], but also supports aws session tokens for temporary credentials.
120
123
 
121
124
  **aws_key_id**
122
125
 
@@ -126,12 +129,16 @@ AWS access key id. This parameter is required when your agent is not running on
126
129
 
127
130
  AWS secret key. This parameter is required when your agent is not running on EC2 instance with an IAM Role.
128
131
 
132
+ **aws_ses_token**
133
+
134
+ AWS session token. This parameter is optional, but can be provided if using MFA or temporary credentials when your agent is not running on EC2 instance with an IAM Role.
135
+
129
136
  **aws_iam_retries**
130
137
 
131
138
  The number of attempts to make (with exponential backoff) when loading instance profile credentials from the EC2 metadata service using an IAM role. Defaults to 5 retries.
132
139
 
133
140
  ### assume_role_credentials
134
- Typically, you use AssumeRole for cross-account access or federation.
141
+ Typically, you can use AssumeRole for cross-account access or federation.
135
142
 
136
143
  <match *>
137
144
  @type kinesis_streams
@@ -145,9 +152,9 @@ Typically, you use AssumeRole for cross-account access or federation.
145
152
  See also:
146
153
 
147
154
  * [Using IAM Roles - AWS Identity and Access
148
- Management](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
149
- * [Aws::STS::Client](http://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
150
- * [Aws::AssumeRoleCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/AssumeRoleCredentials.html)
155
+ Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
156
+ * [Aws::STS::Client](https://docs.aws.amazon.com/sdkforruby/api/Aws/STS/Client.html)
157
+ * [Aws::AssumeRoleCredentials](https://docs.aws.amazon.com/sdkforruby/api/Aws/AssumeRoleCredentials.html)
151
158
 
152
159
  **role_arn (required)**
153
160
 
@@ -175,6 +182,10 @@ Proxy url for proxying requests to amazon sts service api. This needs to be set
175
182
  It should be added to assume_role_credentials configuration stanza in the next format:
176
183
  sts_http_proxy http://[username:password]@hostname:port
177
184
 
185
+ **sts_endpoint_url**
186
+
187
+ STS API endpoint url. This can be used to override the default global STS API endpoint of sts.amazonaws.com. Using regional endpoints may be preferred to reduce latency, and are required if utilizing a PrivateLink VPC Endpoint for STS API calls.
188
+
178
189
  ### instance_profile_credentials
179
190
 
180
191
  Retrieve temporary security credentials via HTTP request. This is useful on EC2 instance.
@@ -190,11 +201,11 @@ Retrieve temporary security credentials via HTTP request. This is useful on EC2
190
201
 
191
202
  See also:
192
203
 
193
- * [Aws::InstanceProfileCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/InstanceProfileCredentials.html)
204
+ * [Aws::InstanceProfileCredentials](https://docs.aws.amazon.com/sdkforruby/api/Aws/InstanceProfileCredentials.html)
194
205
  * [Temporary Security Credentials - AWS Identity and Access
195
- Management](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
206
+ Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
196
207
  * [Instance Metadata and User Data - Amazon Elastic Compute
197
- Cloud](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
208
+ Cloud](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
198
209
 
199
210
  **retries**
200
211
 
@@ -231,7 +242,7 @@ This loads AWS access credentials from local ini file. This is useful for local
231
242
 
232
243
  See also:
233
244
 
234
- * [Aws::SharedCredentials](http://docs.aws.amazon.com/sdkforruby/api/Aws/SharedCredentials.html)
245
+ * [Aws::SharedCredentials](https://docs.aws.amazon.com/sdkforruby/api/Aws/SharedCredentials.html)
235
246
 
236
247
  **path**
237
248
 
@@ -265,7 +276,7 @@ Command to be executed as an external process.
265
276
  ## Configuration: Format
266
277
 
267
278
  ### format (section)
268
- This plugin use `Fluent::TextFormatter` to serialize record to string. For more detail, see [formatter.rb]. By default, it uses `json` formatter same as specific like below:
279
+ This plugin uses `Fluent::TextFormatter` to serialize record to string. See [formatter.rb] for more details. By default, it uses `json` formatter same as specific like below:
269
280
 
270
281
  <match *>
271
282
  @type kinesis_streams
@@ -275,10 +286,12 @@ This plugin use `Fluent::TextFormatter` to serialize record to string. For more
275
286
  </format>
276
287
  </match>
277
288
 
289
+ For other configurations of `json` formatter, see [json formatter plugin][fluentd-formatter-json].
290
+
278
291
  ### inject (section)
279
- This plugin use `Fluent::TimeFormatter` and other injection configurations. For more detail, see [inject.rb]. This section only works with Fluentd v0.14.
292
+ This plugin uses `Fluent::TimeFormatter` and other injection configurations. See [inject.rb] for more details.
280
293
 
281
- For example, the config below will add `time` field whose value is eventtime with nanosecond and `tag` field whose value is its tag. (Mostly same as `include_time key true` and `include_tag_key true`)
294
+ For example, the config below will add `time` field whose value is event time with nanosecond and `tag` field whose value is its tag.
282
295
 
283
296
  <match *>
284
297
  @type kinesis_streams
@@ -293,16 +306,6 @@ By default, `time_type string` and `time_format %Y-%m-%dT%H:%M:%S.%N%z` are alre
293
306
 
294
307
  Also, there are some format related options below:
295
308
 
296
- ### include_time_key
297
- **Notice** With Fluentd v0.14, you should use inject section.
298
-
299
- Defalut `false`. If you want to include `time` field in your record, set `true`.
300
-
301
- ### include_tag_key
302
- **Notice** With Fluentd v0.14, you should use inject section.
303
-
304
- Defalut `false`. If you want to include `tag` field in your record, set `true`.
305
-
306
309
  ### data_key
307
310
  If your record contains a field whose string should be sent to Amazon Kinesis directly (without formatter), use this parameter to specify the field. In that case, other fields than **data_key** are thrown away and never sent to Amazon Kinesis. Default `nil`, which means whole record will be formatted and sent.
308
311
 
@@ -368,6 +371,30 @@ Here are `kinesis_streams` specific configurations.
368
371
  ### stream_name
369
372
  Name of the stream to put data.
370
373
 
374
+ As of Fluentd v1, built-in placeholders are supported. Now, you can also use built-in placeholders for this parameter.
375
+
376
+ **NOTE:**
377
+ Built-in placeholders require target key information in your buffer section attributes.
378
+
379
+ e.g.)
380
+
381
+ When you specify the following `stream_name` configuration with built-in placeholder:
382
+
383
+ ```aconf
384
+ stream_name "${$.kubernetes.annotations.kinesis_streams}"
385
+ ```
386
+
387
+ you ought to specify the corresponding attributes in buffer section:
388
+
389
+ ```aconf
390
+ # $.kubernetes.annotations.kinesis_streams needs to be set in buffer attributes
391
+ <buffer $.kubernetes.annotations.kinesis_streams>
392
+ # ...
393
+ </buffer>
394
+ ```
395
+
396
+ For more details, refer [Placeholders section in the official Fluentd document](https://docs.fluentd.org/configuration/buffer-section#placeholders).
397
+
371
398
  ### partition_key
372
399
  A key to extract partition key from JSON object. Default `nil`, which means partition key will be generated randomly.
373
400
 
@@ -387,6 +414,30 @@ Here are `kinesis_streams_aggregated` specific configurations.
387
414
  ### stream_name
388
415
  Name of the stream to put data.
389
416
 
417
+ As of Fluentd v1, built-in placeholders are supported. Now, you can also use built-in placeholders for this parameter.
418
+
419
+ **NOTE:**
420
+ Built-in placeholders require target key information in your buffer section attributes.
421
+
422
+ e.g.)
423
+
424
+ When you specify the following `stream_name` configuration with built-in placeholder:
425
+
426
+ ```aconf
427
+ stream_name "${$.kubernetes.annotations.kinesis_streams_aggregated}"
428
+ ```
429
+
430
+ you ought to specify the corresponding attributes in buffer section:
431
+
432
+ ```aconf
433
+ # $.kubernetes.annotations.kinesis_streams_aggregated needs to be set in buffer attributes
434
+ <buffer $.kubernetes.annotations.kinesis_streams_aggregated>
435
+ # ...
436
+ </buffer>
437
+ ```
438
+
439
+ For more details, refer [Placeholders section in the official Fluentd document](https://docs.fluentd.org/configuration/buffer-section#placeholders).
440
+
390
441
  ### fixed_partition_key
391
442
  A value of fixed partition key. Default `nil`, which means partition key will be generated randomly.
392
443
 
@@ -414,17 +465,18 @@ Bug reports and pull requests are welcome on [GitHub][github].
414
465
  * [Amazon Kinesis Data Streams Developer Guide](http://docs.aws.amazon.com/kinesis/latest/dev/introduction.html)
415
466
  * [Amazon Kinesis Data Firehose Developer Guide](http://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html)
416
467
 
417
- [fluentd]: http://fluentd.org/
468
+ [fluentd]: https://www.fluentd.org/
418
469
  [streams]: https://aws.amazon.com/kinesis/streams/
419
470
  [firehose]: https://aws.amazon.com/kinesis/firehose/
420
471
  [kpl]: https://github.com/awslabs/amazon-kinesis-producer/blob/master/aggregation-format.md
421
- [td-agent]: https://github.com/treasure-data/td-agent
422
- [bundler]: http://bundler.io/
423
- [region]: http://docs.aws.amazon.com/general/latest/gr/rande.html#ak_region
424
- [fluentd_buffer]: http://docs.fluentd.org/articles/buffer-plugin-overview
472
+ [td-agent]: https://github.com/treasure-data/omnibus-td-agent
473
+ [bundler]: https://bundler.io/
474
+ [region]: https://docs.aws.amazon.com/general/latest/gr/rande.html#ak_region
475
+ [fluentd-buffer-section]: https://docs.fluentd.org/configuration/buffer-section
476
+ [fluentd-formatter-json]: https://docs.fluentd.org/formatter/json
425
477
  [github]: https://github.com/awslabs/aws-fluent-plugin-kinesis
426
478
  [formatter.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/formatter.rb
427
479
  [inject.rb]: https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin_helper/inject.rb
428
- [fluentd-doc-kinesis]: http://docs.fluentd.org/articles/kinesis-stream
480
+ [fluentd-doc-kinesis]: https://docs.fluentd.org/how-to-guides/kinesis-stream
429
481
  [fluent-plugin-s3]: https://github.com/fluent/fluent-plugin-s3
430
482
  [v1-readme]: https://github.com/awslabs/aws-fluent-plugin-kinesis/blob/v1/README.md
@@ -28,9 +28,9 @@ Gem::Specification.new do |spec|
28
28
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
- spec.required_ruby_version = '>= 2.1'
31
+ spec.required_ruby_version = '>= 2.3'
32
32
 
33
- spec.add_dependency "fluentd", ">= 0.14.10", "< 2"
33
+ spec.add_dependency "fluentd", ">= 0.14.22", "< 2"
34
34
 
35
35
  # This plugin is sometimes used with s3 plugin, so watch out for conflicts
36
36
  # https://rubygems.org/gems/fluent-plugin-s3
@@ -40,12 +40,20 @@ Gem::Specification.new do |spec|
40
40
  # NoMethodError: undefined method `event=' for #<Seahorse::Model::Shapes::ShapeRef:*>
41
41
  # https://github.com/aws/aws-sdk-ruby/commit/03d60f9d3d821e645bd2a3efca066f37350ef906#diff-c69f15af8ea3eb9ab152659476e04608R401
42
42
  # https://github.com/aws/aws-sdk-ruby/commit/571c2d0e5ff9c24ff72893a08a74790db591fb57#diff-a55155f04aa6559460a0814e264eb0cdR43
43
- spec.add_dependency "aws-sdk-kinesis", "~> 1", "!= 1.4", "!= 1.5"
43
+ # Exclude aws-sdk-kinesis v1.14 to avoid aws-sdk-core dependency problem with td-agent v3.4.1
44
+ # LoadError: cannot load such file -- aws-sdk-core/plugins/transfer_encoding.rb
45
+ # https://github.com/aws/aws-sdk-ruby/commit/bb61ed0a2fabc6b1f90b757f13f37d5aeae48d8a#diff-b493e941d32289cd2df7eebc3fc5be2cR26
46
+ # https://github.com/aws/aws-sdk-ruby/commit/e26577d2a426a4be79cd2d9edc1a4a4176e388ba#diff-10f50e27b30c3dc522b3c25db5782e2e
47
+ spec.add_dependency "aws-sdk-kinesis", "~> 1", "!= 1.4", "!= 1.5", "!= 1.14"
44
48
  # Exclude aws-sdk-firehose v1.9 to avoid aws-sdk-core dependency problem with td-agent v3.2.1
45
49
  # LoadError: cannot load such file -- aws-sdk-core/plugins/endpoint_discovery.rb
46
50
  # https://github.com/aws/aws-sdk-ruby/commit/85d8538a62255e58d9e176ee524a9f94354b51a0#diff-d51486091a10ada65b308b7f45966af1R18
47
51
  # https://github.com/aws/aws-sdk-ruby/commit/7c9584bc6473100df9aec9333ab491ad4faeeca8#diff-be94f87e58e00329a6c0e03e43d5c292
48
- spec.add_dependency "aws-sdk-firehose", "~> 1", "!= 1.5", "!= 1.9"
52
+ # Exclude aws-sdk-firehose v1.15 to avoid aws-sdk-core dependency problem with td-agent v3.4.1
53
+ # LoadError: cannot load such file -- aws-sdk-core/plugins/transfer_encoding.rb
54
+ # https://github.com/aws/aws-sdk-ruby/commit/bb61ed0a2fabc6b1f90b757f13f37d5aeae48d8a#diff-d51486091a10ada65b308b7f45966af1R26
55
+ # https://github.com/aws/aws-sdk-ruby/commit/e26577d2a426a4be79cd2d9edc1a4a4176e388ba#diff-10f50e27b30c3dc522b3c25db5782e2e
56
+ spec.add_dependency "aws-sdk-firehose", "~> 1", "!= 1.5", "!= 1.9", "!= 1.15"
49
57
 
50
58
  spec.add_dependency "google-protobuf", "~> 3"
51
59
 
@@ -17,4 +17,4 @@ source 'https://rubygems.org'
17
17
  # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
18
  gemspec path: ".."
19
19
 
20
- gem "fluentd", "0.14.10"
20
+ gem "fluentd", "0.14.22"
@@ -0,0 +1,31 @@
1
+ #
2
+ # Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
5
+ # may not use this file except in compliance with the License. A copy of
6
+ # the License is located at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # or in the "license" file accompanying this file. This file is
11
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ # ANY KIND, either express or implied. See the License for the specific
13
+ # language governing permissions and limitations under the License.
14
+
15
+ source 'https://rubygems.org'
16
+
17
+ # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
+ gemspec path: ".."
19
+
20
+ # Specify related gems for td-agent v3.1.0
21
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/config/projects/td-agent3.rb#L25
22
+ gem "fluentd", "0.14.25"
23
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.1.0/plugin_gems.rb#L16-L23
24
+ gem "jmespath", "1.3.1"
25
+ gem "aws-partitions", "1.42.0"
26
+ gem "aws-sigv4", "1.0.2"
27
+ gem "aws-sdk-core", "3.11.0"
28
+ gem "aws-sdk-kms", "1.3.0"
29
+ gem "aws-sdk-sqs", "1.3.0"
30
+ gem "aws-sdk-s3", "1.8.0"
31
+ gem "fluent-plugin-s3", "1.1.0"
@@ -0,0 +1,34 @@
1
+ #
2
+ # Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
5
+ # may not use this file except in compliance with the License. A copy of
6
+ # the License is located at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # or in the "license" file accompanying this file. This file is
11
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ # ANY KIND, either express or implied. See the License for the specific
13
+ # language governing permissions and limitations under the License.
14
+
15
+ source 'https://rubygems.org'
16
+
17
+ # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
+ gemspec path: ".."
19
+
20
+ # Specify related gems for td-agent v3.4.1
21
+ # td-agent v3.4.0 has the same dependencies
22
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/config/projects/td-agent3.rb#L27
23
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/config/projects/td-agent3.rb#L27
24
+ gem "fluentd", "1.4.2"
25
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.1/plugin_gems.rb#L16-L23
26
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.4.0/plugin_gems.rb#L16-L23
27
+ gem "jmespath", "1.4.0"
28
+ gem "aws-partitions", "1.149.0"
29
+ gem "aws-sigv4", "1.1.0"
30
+ gem "aws-sdk-core", "3.48.3"
31
+ gem "aws-sdk-kms", "1.16.0"
32
+ gem "aws-sdk-sqs", "1.13.0"
33
+ gem "aws-sdk-s3", "1.36.0"
34
+ gem "fluent-plugin-s3", "1.1.9"
@@ -0,0 +1,31 @@
1
+ #
2
+ # Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"). You
5
+ # may not use this file except in compliance with the License. A copy of
6
+ # the License is located at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # or in the "license" file accompanying this file. This file is
11
+ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
12
+ # ANY KIND, either express or implied. See the License for the specific
13
+ # language governing permissions and limitations under the License.
14
+
15
+ source 'https://rubygems.org'
16
+
17
+ # Specify your gem's dependencies in fluent-plugin-kinesis.gemspec
18
+ gemspec path: ".."
19
+
20
+ # Specify related gems for td-agent v3.5.0
21
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.5.0/config/projects/td-agent3.rb#L27
22
+ gem "fluentd", "1.7.0"
23
+ # https://github.com/treasure-data/omnibus-td-agent/blob/v3.5.0/plugin_gems.rb#L16-L23
24
+ gem "jmespath", "1.4.0"
25
+ gem "aws-partitions", "1.195.0"
26
+ gem "aws-sigv4", "1.1.0"
27
+ gem "aws-sdk-core", "3.61.2"
28
+ gem "aws-sdk-kms", "1.24.0"
29
+ gem "aws-sdk-sqs", "1.20.0"
30
+ gem "aws-sdk-s3", "1.46.0"
31
+ gem "fluent-plugin-s3", "1.1.11"
@@ -21,14 +21,15 @@ module Fluent
21
21
  module Client
22
22
  module ClientParams
23
23
  include Fluent::Configurable
24
- config_param :region, :string, default: nil
24
+ config_param :region, :string, default: nil
25
25
 
26
26
  config_param :http_proxy, :string, default: nil, secret: true
27
27
  config_param :endpoint, :string, default: nil
28
28
  config_param :ssl_verify_peer, :bool, default: true
29
29
 
30
- config_param :aws_key_id, :string, default: nil, secret: true
31
- config_param :aws_sec_key, :string, default: nil, secret: true
30
+ config_param :aws_key_id, :string, default: nil, secret: true
31
+ config_param :aws_sec_key, :string, default: nil, secret: true
32
+ config_param :aws_ses_token, :string, default: nil, secret: true
32
33
  config_section :assume_role_credentials, multi: false do
33
34
  desc "The Amazon Resource Name (ARN) of the role to assume"
34
35
  config_param :role_arn, :string, secret: true
@@ -42,6 +43,8 @@ module Fluent
42
43
  config_param :external_id, :string, default: nil, secret: true
43
44
  desc "A http proxy url for requests to aws sts service"
44
45
  config_param :sts_http_proxy, :string, default: nil, secret: true
46
+ desc "A URL for a regional STS API endpoint, the default is global"
47
+ config_param :sts_endpoint_url, :string, default: nil
45
48
  end
46
49
  config_section :instance_profile_credentials, multi: false do
47
50
  desc "Number of times to retry when retrieving credentials"
@@ -115,6 +118,10 @@ module Fluent
115
118
  options = {}
116
119
  credentials_options = {}
117
120
  case
121
+ when @aws_key_id && @aws_sec_key && @aws_ses_token
122
+ options[:access_key_id] = @aws_key_id
123
+ options[:secret_access_key] = @aws_sec_key
124
+ options[:session_token] = @aws_ses_token
118
125
  when @aws_key_id && @aws_sec_key
119
126
  options[:access_key_id] = @aws_key_id
120
127
  options[:secret_access_key] = @aws_sec_key
@@ -125,12 +132,19 @@ module Fluent
125
132
  credentials_options[:policy] = c.policy if c.policy
126
133
  credentials_options[:duration_seconds] = c.duration_seconds if c.duration_seconds
127
134
  credentials_options[:external_id] = c.external_id if c.external_id
128
- if c.sts_http_proxy and @region
135
+ credentials_options[:sts_endpoint_url] = c.sts_endpoint_url if c.sts_endpoint_url
136
+ if c.sts_http_proxy and c.sts_endpoint_url
137
+ credentials_options[:client] = Aws::STS::Client.new(http_proxy: c.sts_http_proxy, endpoint: c.sts_endpoint_url)
138
+ elsif @region and c.sts_http_proxy
129
139
  credentials_options[:client] = Aws::STS::Client.new(region: @region, http_proxy: c.sts_http_proxy)
130
- elsif @region
131
- credentials_options[:client] = Aws::STS::Client.new(region: @region)
140
+ elsif @region and c.sts_endpoint_url
141
+ credentials_options[:client] = Aws::STS::Client.new(region: @region, endpoint: c.sts_endpoint_url)
132
142
  elsif c.sts_http_proxy
133
143
  credentials_options[:client] = Aws::STS::Client.new(http_proxy: c.sts_http_proxy)
144
+ elsif c.sts_endpoint_url
145
+ credentials_options[:client] = Aws::STS::Client.new(endpoint: c.sts_endpoint_url)
146
+ elsif @region
147
+ credentials_options[:client] = Aws::STS::Client.new(region: @region)
134
148
  end
135
149
  options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
136
150
  when @instance_profile_credentials
@@ -41,12 +41,13 @@ module Fluent
41
41
  end
42
42
 
43
43
  def write(chunk)
44
+ stream_name = extract_placeholders(@stream_name, chunk)
44
45
  write_records_batch(chunk) do |batch|
45
46
  records = batch.map{|(data, partition_key)|
46
47
  { data: data, partition_key: partition_key }
47
48
  }
48
49
  client.put_records(
49
- stream_name: @stream_name,
50
+ stream_name: stream_name,
50
51
  records: records,
51
52
  )
52
53
  end
@@ -43,11 +43,12 @@ module Fluent
43
43
  end
44
44
 
45
45
  def write(chunk)
46
+ stream_name = extract_placeholders(@stream_name, chunk)
46
47
  write_records_batch(chunk) do |batch|
47
48
  key = @partition_key_generator.call
48
49
  records = batch.map{|(data)|data}
49
50
  client.put_records(
50
- stream_name: @stream_name,
51
+ stream_name: stream_name,
51
52
  records: [{
52
53
  partition_key: key,
53
54
  data: aggregator.aggregate(records, key),
@@ -13,5 +13,5 @@
13
13
  # language governing permissions and limitations under the License.
14
14
 
15
15
  module FluentPluginKinesis
16
- VERSION = '3.1.0'
16
+ VERSION = '3.2.0'
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kinesis
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-18 00:00:00.000000000 Z
11
+ date: 2019-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.14.10
19
+ version: 0.14.22
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.14.10
29
+ version: 0.14.22
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'
@@ -43,6 +43,9 @@ dependencies:
43
43
  - - "!="
44
44
  - !ruby/object:Gem::Version
45
45
  version: '1.5'
46
+ - - "!="
47
+ - !ruby/object:Gem::Version
48
+ version: '1.14'
46
49
  type: :runtime
47
50
  prerelease: false
48
51
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,6 +59,9 @@ dependencies:
56
59
  - - "!="
57
60
  - !ruby/object:Gem::Version
58
61
  version: '1.5'
62
+ - - "!="
63
+ - !ruby/object:Gem::Version
64
+ version: '1.14'
59
65
  - !ruby/object:Gem::Dependency
60
66
  name: aws-sdk-firehose
61
67
  requirement: !ruby/object:Gem::Requirement
@@ -69,6 +75,9 @@ dependencies:
69
75
  - - "!="
70
76
  - !ruby/object:Gem::Version
71
77
  version: '1.9'
78
+ - - "!="
79
+ - !ruby/object:Gem::Version
80
+ version: '1.15'
72
81
  type: :runtime
73
82
  prerelease: false
74
83
  version_requirements: !ruby/object:Gem::Requirement
@@ -82,6 +91,9 @@ dependencies:
82
91
  - - "!="
83
92
  - !ruby/object:Gem::Version
84
93
  version: '1.9'
94
+ - - "!="
95
+ - !ruby/object:Gem::Version
96
+ version: '1.15'
85
97
  - !ruby/object:Gem::Dependency
86
98
  name: google-protobuf
87
99
  requirement: !ruby/object:Gem::Requirement
@@ -271,11 +283,14 @@ files:
271
283
  - Rakefile
272
284
  - benchmark/task.rake
273
285
  - fluent-plugin-kinesis.gemspec
274
- - gemfiles/Gemfile.fluentd-0.14.10
286
+ - gemfiles/Gemfile.fluentd-0.14.22
287
+ - gemfiles/Gemfile.td-agent-3.1.0
275
288
  - gemfiles/Gemfile.td-agent-3.1.1
276
289
  - gemfiles/Gemfile.td-agent-3.2.0
277
290
  - gemfiles/Gemfile.td-agent-3.2.1
278
291
  - gemfiles/Gemfile.td-agent-3.3.0
292
+ - gemfiles/Gemfile.td-agent-3.4.1
293
+ - gemfiles/Gemfile.td-agent-3.5.0
279
294
  - lib/fluent/plugin/kinesis.rb
280
295
  - lib/fluent/plugin/kinesis_helper/aggregator.rb
281
296
  - lib/fluent/plugin/kinesis_helper/api.rb
@@ -296,7 +311,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
311
  requirements:
297
312
  - - ">="
298
313
  - !ruby/object:Gem::Version
299
- version: '2.1'
314
+ version: '2.3'
300
315
  required_rubygems_version: !ruby/object:Gem::Requirement
301
316
  requirements:
302
317
  - - ">="