File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
lib/instance_agent/plugins/codedeploy
test/instance_agent/plugins/codedeploy Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -288,8 +288,11 @@ def s3_options
288288 options [ :endpoint ] = URI ( InstanceAgent ::Config . config [ :s3_endpoint_override ] )
289289 elsif InstanceAgent ::Config . config [ :use_fips_mode ]
290290 ProcessManager ::Log . info ( "using fips endpoint" )
291- # This is not a true region but a way to signal to the S3 client that a FIPS enpoint should be used; added in SDK3.
292- options [ :region ] = "fips-#{ region } "
291+ # There was a recent change to S3 client to decompose the region and use a FIPS endpoint is "fips-" is appended
292+ # to the region. However, this is such a recent change that we cannot rely on the latest version of the SDK to be loaded.
293+ # For now, the endpoint will be set directly if FIPS is active but can switch to the S3 method once we have broader support.
294+ # options[:region] = "fips-#{region}"
295+ options [ :endpoint ] = "https://s3-fips.#{ region } .amazonaws.com"
293296 end
294297 proxy_uri = nil
295298 if InstanceAgent ::Config . config [ :proxy_uri ]
Original file line number Diff line number Diff line change @@ -353,8 +353,8 @@ def generate_signed_message_for(map)
353353 InstanceAgent ::Config . config [ :use_fips_mode ] = true
354354 end
355355 should "use correct region and custom endpoint" do
356- assert_equal 'fips- us-east-1' , @command_executor . s3_options [ :region ]
357- assert_false @command_executor . s3_options . include? :endpoint
356+ assert_equal 'us-east-1' , @command_executor . s3_options [ :region ]
357+ assert_true @command_executor . s3_options . include? :endpoint
358358 end
359359 end
360360 end
You can’t perform that action at this time.
0 commit comments