def aws_v4_signature
      date = OpenSSL::HMAC.digest('sha256', 'AWS4' + @secret_key, @timestamp.strftime('%Y%m%d'))
      region = OpenSSL::HMAC.digest('sha256', date, @aws_session.region)
      service = OpenSSL::HMAC.digest('sha256', region, SERVICE_NAME)
      signing_key = OpenSSL::HMAC.digest('sha256', service, 'aws4_request')

      OpenSSL::HMAC.hexdigest('sha256', signing_key, string_to_sign)
    end
def aws_v4_signature
      date = OpenSSL::HMAC.digest('sha256', 'AWS4' + @secret_key, @timestamp.strftime('%Y%m%d'))
      region = OpenSSL::HMAC.digest('sha256', date, @aws_session.region)
      service = OpenSSL::HMAC.digest('sha256', region, SERVICE_NAME)
      signing_key = OpenSSL::HMAC.digest('sha256', service, 'aws4_request')

      OpenSSL::HMAC.hexdigest('sha256', signing_key, string_to_sign)
    end
Task 3: Calculate the AWS Signature Version 4
   http://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html