3

I am getting this error to access S3 bucket. My region is mumbai.

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request InvalidRequestThe authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.7BD86CC040523574I1zzUtAgjBS0dOUo/mP/Z7uei/l+f8YXEdlqeu1N+7mXrHV9IwYxWBLkx1E/y4DNm6QzPdyRihE=

Mahbubur Rahman
  • 4,961
  • 2
  • 39
  • 46
Rahul Verma
  • 404
  • 8
  • 20

1 Answers1

2

Try by providing the host name corresponding to the S3 bucket region. For example:

from boto.s3.connection import S3Connection
conn = S3Connection(aws_access_key, aws_secret_key, host='s3.us-east- 2.amazonaws.com')
Subin
  • 31
  • 4
  • this solved my issue with some legacy code that 'used to' work just fine 4 years ago. since then i've noticed AWS changing around their bucket region and SLD (second level domain) formatting... so maybe being more specific with this param is now required? note: i'm using boto v2.49 now; but i can't verify what i was using 4 years ago – greenhouse May 19 '20 at 19:31