lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.3 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-0.6.4

- old
+ new

@@ -18,15 +18,15 @@ config_param :path, :string, :default => "" config_param :use_server_side_encryption, :string, :default => nil config_param :aws_key_id, :string, :default => nil, :secret => true config_param :aws_sec_key, :string, :default => nil, :secret => true config_section :assume_role_credentials, :multi => false do - config_param :role_arn, :string + config_param :role_arn, :string, :secret => true config_param :role_session_name, :string config_param :policy, :string, :default => nil config_param :duration_seconds, :integer, :default => nil - config_param :external_id, :string, :default => nil + config_param :external_id, :string, :default => nil, :secret => true end config_section :instance_profile_credentials, :multi => false do config_param :retries, :integer, :default => nil config_param :ip_address, :string, :default => nil config_param :port, :integer, :default => nil @@ -53,11 +53,11 @@ config_param :storage_class, :string, :default => "STANDARD" config_param :format, :string, :default => 'out_file' config_param :acl, :string, :default => :private config_param :hex_random_length, :integer, :default => 4 config_param :overwrite, :bool, :default => false - config_param :ssekms_key_id, :string, :default => nil + config_param :ssekms_key_id, :string, :default => nil, :secret => true config_param :compute_checksums, :bool, :default => nil # use nil to follow SDK default configuration attr_reader :bucket include Fluent::Mixin::ConfigPlaceholders @@ -233,9 +233,12 @@ credentials_options[:role_arn] = c.role_arn credentials_options[:role_session_name] = c.role_session_name credentials_options[:policy] = c.policy if c.policy credentials_options[:duration_seconds] = c.duration_seconds if c.duration_seconds credentials_options[:external_id] = c.external_id if c.external_id + if @s3_region + credentials_options[:client] = Aws::STS::Client.new(:region => @s3_region) + end options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options) when @instance_profile_credentials c = @instance_profile_credentials credentials_options[:retries] = c.retries if c.retries credentials_options[:ip_address] = c.ip_address if c.ip_address