Skip to content

Commit bd988ef

Browse files
authored
Merge pull request #335 from nyetsche/s3_fips_endpoint
fips s3_endpoint override is valid
2 parents d4f6cc3 + ec76f76 commit bd988ef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/fluent/plugin/in_s3.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ def initialize
118118
def configure(conf)
119119
super
120120

121-
if @s3_endpoint && @s3_endpoint.end_with?('amazonaws.com')
121+
if @s3_endpoint && (@s3_endpoint.end_with?('amazonaws.com') && !['fips', 'gov'].any? { |e| @s3_endpoint.include?(e) })
122122
raise Fluent::ConfigError, "s3_endpoint parameter is not supported for S3, use s3_region instead. This parameter is for S3 compatible services"
123123
end
124124

125-
if @sqs.endpoint && @sqs.endpoint.end_with?('amazonaws.com')
125+
if @sqs_endpoint && (@sqs_endpoint.end_with?('amazonaws.com') && !['fips', 'gov'].any? { |e| @sqs_endpoint.include?(e) })
126126
raise Fluent::ConfigError, "sqs/endpoint parameter is not supported for SQS, use s3_region instead. This parameter is for SQS compatible services"
127127
end
128128

lib/fluent/plugin/out_s3.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def configure(conf)
175175

176176
Aws.use_bundled_cert! if @use_bundled_cert
177177

178-
if @s3_endpoint && @s3_endpoint.end_with?('amazonaws.com')
178+
if @s3_endpoint && (@s3_endpoint.end_with?('amazonaws.com') && !['fips', 'gov'].any? { |e| @s3_endpoint.include?(e) })
179179
raise Fluent::ConfigError, "s3_endpoint parameter is not supported for S3, use s3_region instead. This parameter is for S3 compatible services"
180180
end
181181

0 commit comments

Comments
 (0)