diff --git a/gems/aws-sdk-glacier/lib/aws-sdk-glacier/plugins/account_id.rb b/gems/aws-sdk-glacier/lib/aws-sdk-glacier/plugins/account_id.rb index 00f1e3aac8c..d9654a86a8f 100644 --- a/gems/aws-sdk-glacier/lib/aws-sdk-glacier/plugins/account_id.rb +++ b/gems/aws-sdk-glacier/lib/aws-sdk-glacier/plugins/account_id.rb @@ -16,8 +16,10 @@ class AccountId < Seahorse::Client::Plugin class Handler < Seahorse::Client::Handler def call(context) - context.params[:account_id] = nil if context.params[:account_id].empty? context.params[:account_id] ||= context.config.account_id + if context.params[:account_id].empty? + context.params[:account_id] = '-' + end @handler.call(context) end end diff --git a/gems/aws-sdk-s3/spec/client_spec.rb b/gems/aws-sdk-s3/spec/client_spec.rb index ca3534d8e21..bbd262193d0 100644 --- a/gems/aws-sdk-s3/spec/client_spec.rb +++ b/gems/aws-sdk-s3/spec/client_spec.rb @@ -492,7 +492,7 @@ module S3 it 'uses path style addressing for DNS incompatible bucket names' do client = Client.new(stub_responses: true) resp = client.head_bucket(bucket: 'Bucket123') - expect(resp.context.http_request.endpoint.path).to eq('/Bucket123/') + expect(resp.context.http_request.endpoint.path).to eq('/Bucket123') end end