Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
service,
region):
"""
************* TASK 2: CREATE THE STRING TO SIGN*************
Match the algorithm to the hashing algorithm you use, either SHA-1 or
SHA-256 (recommended)
"""
algorithm = 'AWS4-HMAC-SHA256'
credential_scope = (datestamp + '/' +
region + '/' +
service + '/' +
'aws4_request')
string_to_sign = (algorithm + '\n' +
amzdate + '\n' +
credential_scope + '\n' +
sha256_hash(canonical_request))
__log('\nSTRING_TO_SIGN = ' + string_to_sign)
return string_to_sign, algorithm, credential_scope