- Newest
- Most votes
- Most comments
It would help a lot to see what error messages you are getting. My assumption is that somewhere in your code you're doing something like:
import urllib3
http = urllib3.PoolManager()
response = http.request('GET', request.url, headers={'X-Amz-Date':request.headers['X-Amz-Date'], 'Authorization':request.headers['Authorization'], 'x-amz-content-sha256':'<request hash goes here>'})
If so, what does response.data
have in it? I note that your code is not complete - for example it doesn't calculate the x-amz-content-sha256
header which is necessary according to the documentation.
Incidentally, I did get your code working (sort of) by using the hash from a the debug output of the AWS CLI and putting that into the x-amz-content-sha256
header. You don't need to specify the headers at all as you have above - the SigV4Auth().add_auth()
process does that for you.
Finally, there's a big question of "why" here. Is there something that the boto3 library doesn't do for you already that you need to sign "manually"?
Relevant content
- asked 5 months ago
- asked 5 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago