Skip to content

Commit 0dcf67e

Browse files
riquemonganmacs
andcommitted
Update lib/fluent/plugin/out_s3.rb
Sure, lets try this. Co-authored-by: Yuta Iwama <[email protected]> Signed-off-by: riquemon <[email protected]>
1 parent 3cd5db8 commit 0dcf67e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/fluent/plugin/out_s3.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,11 @@ def setup_credentials
486486
elsif c.sts_endpoint_url
487487
credentials_options[:client] = Aws::STS::Client.new(endpoint: c.sts_endpoint_url)
488488
elsif @region
489-
credentials_options[:client] = Aws::STS::Client.new(region: @region)
489+
opt = @s3_region ? { region: @s3_region } : {}
490+
opt[:http_proxy] = c.sts_http_proxy if c.sts_http_proxy
491+
opt[:endpoint_url] = c.sts_endpoint_url if c.sts_endpoint_url
492+
493+
credentials_options[:client] = Aws::STS::Client.new(**opt)
490494
end
491495
options[:credentials] = Aws::AssumeRoleCredentials.new(credentials_options)
492496
when @web_identity_credentials

0 commit comments

Comments
 (0)