def _sig_key(key, date_stamp, regionName, serviceName):
 kDate = _sign(('AWS4' + key).encode('utf-8'), date_stamp)
 if regionName:
  kRegion = _sign(kDate, regionName)
  kService = _sign(kRegion, serviceName)
 else:
  kService = _sign(kDate, serviceName)
 kSigning = _sign(kService, 'aws4_request')
 return kSigning

def _sig_key ( key , date_stamp , regionName , serviceName ) : kDate = _sign ( ( 'AWS4' + key ) . encode ( 'utf-8' ) , date_stamp ) if regionName : kRegion = _sign ( kDate , regionName ) kService = _sign ( kRegion , serviceName ) else : kService = _sign ( kDate , serviceName ) kSigning = _sign ( kService , 'aws4_request' ) return kSigning
get a signature key .