'Creates the signature required for AWS, per
http://bit.ly/aR7GaQ [docs.amazonwebservices.com]:
StringToSign = HTTPVerb + "
ValueOfHostHeaderInLowercase + "
HTTPRequestURI + "
CanonicalizedQueryString <from the preceding step>'

def _get_aws_auth_param(self, params, secret_key, path='/'):

    connection = self.connection
    keys = list(params.keys())
    keys.sort()
    pairs = []
    for key in keys:
        value = str(params[key])
        pairs.append(((urlquote(key, safe='') + '=') + urlquote(value, safe='-_~')))
    qs = '&'.join(pairs)
    hostname = connection.host
    if ((connection.secure and (connection.port != 443)) or ((not connection.secure) and (connection.port != 80))):
        hostname += (':' + str(connection.port))
    string_to_sign = '\n'.join(('GET', hostname, path, qs))
    b64_hmac = base64.b64encode(hmac.new(b(secret_key), b(string_to_sign), digestmod=sha256).digest())
    return b64_hmac.decode('utf-8')
