class Aws::S3::Plugins::S3Signer::V4Handler

def call(context)

def call(context)
  Aws::Plugins::SignatureV4.apply_signature(
    context: context,
    signer: sigv4_signer(context)
  )
  @handler.call(context)
end

def sigv4_signer(context)

def sigv4_signer(context)
  # If the client was configured with the wrong region,
  # we have to build a new signer.
  if
    context[:cached_sigv4_region] &&
    context[:cached_sigv4_region] != context.config.sigv4_signer.region
  then
    S3Signer.build_v4_signer(
      region: context[:cached_sigv4_region],
      credentials: context.config.credentials
    )
  else
    context.config.sigv4_signer
  end
end