lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.5 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.6

- old
+ new

@@ -94,11 +94,11 @@ desc "The type of storage to use for the object(STANDARD,REDUCED_REDUNDANCY)" config_param :storage_class, :string, :default => "STANDARD" desc "Change one line format in the S3 object (out_file,json,ltsv,single_value)" config_param :format, :string, :default => 'out_file' desc "Permission for the object in S3" - config_param :acl, :string, :default => :private + config_param :acl, :string, :default => nil desc "The length of `%{hex_random}` placeholder(4-16)" config_param :hex_random_length, :integer, :default => 4 desc "Overwrite already existing path" config_param :overwrite, :bool, :default => false desc "Specifies the AWS KMS key ID to use for object encryption" @@ -214,12 +214,17 @@ begin @compressor.compress(chunk, tmp) tmp.rewind log.debug { "out_s3: write chunk: {key:#{chunk.key},tsuffix:#{tsuffix(chunk)}} to s3://#{@s3_bucket}/#{s3path}" } - put_options = {:body => tmp, :content_type => @compressor.content_type, :storage_class => @storage_class} + put_options = { + :body => tmp, + :content_type => @compressor.content_type, + :storage_class => @storage_class, + } put_options[:server_side_encryption] = @use_server_side_encryption if @use_server_side_encryption put_options[:ssekms_key_id] = @ssekms_key_id if @ssekms_key_id + put_options[:acl] = @acl if @acl @bucket.object(s3path).put(put_options) @values_for_s3_object_chunk.delete(chunk.unique_id) ensure tmp.close(true) rescue nil