def getSignatureKey(key, dateStamp, regionName, serviceName):
    """
    Generate the signing key for AWS V4 requests.

    @param key: The secret key to use.
    @type key: L{bytes}

    @param dateStamp: The UTC date and time, serialized as an AWS date
        stamp.
    @type dateStamp: L{bytes}

    @param regionName: The name of the region.
    @type regionName: L{bytes}

    @param serviceName: The name of the service to which the request
        will be sent.
    @type serviceName: L{bytes}

    @return: The signature.
    @rtype: L{bytes}
    """
    kDate = sign((b'AWS4' + key), dateStamp)
    kRegion = sign(kDate, regionName)
    kService = sign(kRegion, serviceName)
    kSigning = sign(kService, b'aws4_request')
    return kSigning
def getSignatureKey ( key , dateStamp , regionName , serviceName ) : kDate = sign ( ( b'AWS4' + key ) , dateStamp ) kRegion = sign ( kDate , regionName ) kService = sign ( kRegion , serviceName ) kSigning = sign ( kService , b'aws4_request' ) return kSigning
Generate the signing key for AWS V4 requests.

    @param key: The secret key to use.
    @type key: L{bytes}

    @param dateStamp: The UTC date and time, serialized as an AWS date
        stamp.
    @type dateStamp: L{bytes}

    @param regionName: The name of the region.
    @type regionName: L{bytes}

    @param serviceName: The name of the service to which the request
        will be sent.
    @type serviceName: L{bytes}

    @return: The signature.
    @rtype: L{bytes}