[aws] fix canonical/signed headers generation in python 2(closes #15102)