class Aws::S3Control::Plugins::S3Signer

@api private
This plugin is an implementation detail and may be modified.

def add_handlers(handlers, cfg)

def add_handlers(handlers, cfg)
  handlers.add(V4Handler, step: :sign)
end

def build_v4_signer(options = {})

Other tags:
    Api: - private

Options Hash: (**options)
  • :credentials (required, #credentials) --
  • :region (required, String) --
def build_v4_signer(options = {})
  Aws::Sigv4::Signer.new({
    service: 's3',
    region: options[:region],
    credentials_provider: options[:credentials],
    uri_escape_path: false,
    unsigned_headers: ['content-length', 'x-amzn-trace-id'],
  })
end

def new_hostname(context, region)

def new_hostname(context, region)
  bucket = context.params[:bucket]
  if region == 'us-east-1'
    "#{bucket}.s3.amazonaws.com"
  else
    endpoint = Aws::Partitions::EndpointProvider.resolve(region, 's3')
    bucket + '.' + URI.parse(endpoint).host
  end
end