@@ -44,7 +44,7 @@ def initialize
4444 desc "A http proxy url for requests to aws sts service"
4545 config_param :sts_http_proxy , :string , default : nil , secret : true
4646 desc "A url for a regional sts api endpoint, the default is global"
47- config_param :sts_endpoint_url , :string , default : nil ## STS_region
47+ config_param :sts_endpoint_url , :string , default : nil
4848 end
4949 # See the following link for additional params that could be added:
5050 # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/STS/Client.html#assume_role_with_web_identity-instance_method
@@ -495,11 +495,11 @@ def setup_credentials
495495 credentials_options [ :external_id ] = c . external_id if c . external_id
496496 credentials_options [ :sts_endpoint_url ] = c . sts_endpoint_url if c . sts_endpoint_url
497497 credentials_options [ :sts_http_proxy ] = c . sts_http_proxy if c . sts_http_proxy
498- if c . sts_http_proxy and c . sts_endpoint_url
498+ if c . sts_http_proxy && c . sts_endpoint_url
499499 credentials_options [ :client ] = Aws ::STS ::Client . new ( http_proxy : c . sts_http_proxy , endpoint : c . sts_endpoint_url )
500- elsif @region and c . sts_http_proxy
500+ elsif @region && c . sts_http_proxy
501501 credentials_options [ :client ] = Aws ::STS ::Client . new ( region : @region , http_proxy : c . sts_http_proxy )
502- elsif @region and c . sts_endpoint_url
502+ elsif @region && c . sts_endpoint_url
503503 credentials_options [ :client ] = Aws ::STS ::Client . new ( region : @region , endpoint : c . sts_endpoint_url )
504504 elsif c . sts_http_proxy
505505 credentials_options [ :client ] = Aws ::STS ::Client . new ( http_proxy : c . sts_http_proxy )
0 commit comments