fluent-plugin-s3 0.5.10 → 0.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README.rdoc +12 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_s3.rb +4 -2
- data/test/test_out_s3.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8fc0cbcb10886649237d443f3c2ca2a78157b26
|
4
|
+
data.tar.gz: 41c079389e44e2f47c8abcfad167b0724060d65d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dece2571ff2d3899f8aa33b87dd8c21762f15eb732bfbf8867dd23760747b88d061113bda9dc060e430fa7d483daa4fd8540d13e2642ca9fd1158ea7c5bc260
|
7
|
+
data.tar.gz: 479759306f6db9351384e1848e5030f134ef4b8e4a3a99bf9afcb5f87a805e49ed97032fc06701c74469fc20100df75be1e6f7c4dad121eea334c91cf4b813aa
|
data/ChangeLog
CHANGED
data/README.rdoc
CHANGED
@@ -158,6 +158,18 @@ You can change key name by "message_key" option.
|
|
158
158
|
|
159
159
|
[reduced_redundancy] Use S3 reduced redundancy storage for 33% cheaper pricing. Default is false.
|
160
160
|
|
161
|
+
[acl] Permission for the object in S3. This is useful for cross-account access using IAM roles. Valid values are:
|
162
|
+
|
163
|
+
- private (default)
|
164
|
+
- public_read
|
165
|
+
- public_read_write (not recommended - see {Canned ACL}[http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl])
|
166
|
+
- authenticated_read
|
167
|
+
- bucket_owner_read
|
168
|
+
- bucket_owner_full_control
|
169
|
+
|
170
|
+
To use cross-account access, you will need to create a bucket policy granting
|
171
|
+
the specific access required. Refer to the {AWS documentation}[http://docs.aws.amazon.com/AmazonS3/latest/dev/example-walkthroughs-managing-access-example3.html] for examples.
|
172
|
+
|
161
173
|
== IAM Policy
|
162
174
|
|
163
175
|
The following is an example for a minimal IAM policy needed to write to an s3 bucket (matches my-s3bucket/logs, my-s3bucket-test, etc.).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.11
|
data/lib/fluent/plugin/out_s3.rb
CHANGED
@@ -30,6 +30,7 @@ module Fluent
|
|
30
30
|
config_param :proxy_uri, :string, :default => nil
|
31
31
|
config_param :reduced_redundancy, :bool, :default => false
|
32
32
|
config_param :format, :string, :default => 'out_file'
|
33
|
+
config_param :acl, :string, :default => :private
|
33
34
|
|
34
35
|
attr_reader :bucket
|
35
36
|
|
@@ -84,7 +85,7 @@ module Fluent
|
|
84
85
|
options[:s3_endpoint] = @s3_endpoint if @s3_endpoint
|
85
86
|
options[:proxy_uri] = @proxy_uri if @proxy_uri
|
86
87
|
options[:use_ssl] = @use_ssl
|
87
|
-
options[:s3_server_side_encryption] = @use_server_side_encryption
|
88
|
+
options[:s3_server_side_encryption] = @use_server_side_encryption.to_sym if @use_server_side_encryption
|
88
89
|
|
89
90
|
@s3 = AWS::S3.new(options)
|
90
91
|
@bucket = @s3.buckets[@s3_bucket]
|
@@ -125,7 +126,8 @@ module Fluent
|
|
125
126
|
begin
|
126
127
|
@compressor.compress(chunk, tmp)
|
127
128
|
@bucket.objects[s3path].write(Pathname.new(tmp.path), {:content_type => @compressor.content_type,
|
128
|
-
:reduced_redundancy => @reduced_redundancy
|
129
|
+
:reduced_redundancy => @reduced_redundancy,
|
130
|
+
:acl => @acl})
|
129
131
|
ensure
|
130
132
|
tmp.close(true) rescue nil
|
131
133
|
end
|
data/test/test_out_s3.rb
CHANGED
@@ -260,7 +260,7 @@ class S3OutputTest < Test::Unit::TestCase
|
|
260
260
|
|
261
261
|
pathname.to_s.match(%r|s3-|)
|
262
262
|
},
|
263
|
-
{:content_type => "application/x-gzip", :reduced_redundancy => false})
|
263
|
+
{:content_type => "application/x-gzip", :reduced_redundancy => false, :acl => :private})
|
264
264
|
|
265
265
|
# Assert the key of S3Object, which event logs are stored in
|
266
266
|
s3obj_col = flexmock(AWS::S3::ObjectCollection)
|
@@ -307,7 +307,7 @@ class S3OutputTest < Test::Unit::TestCase
|
|
307
307
|
|
308
308
|
pathname.to_s.match(%r|s3-|)
|
309
309
|
},
|
310
|
-
{:content_type => "application/x-gzip", :reduced_redundancy => false})
|
310
|
+
{:content_type => "application/x-gzip", :reduced_redundancy => false, :acl => :private})
|
311
311
|
|
312
312
|
# Assert the key of S3Object, which event logs are stored in
|
313
313
|
s3obj_col = flexmock(AWS::S3::ObjectCollection)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|