Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request

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=

like image 373
Rahul Verma Avatar asked Dec 07 '25 17:12

Rahul Verma


1 Answers

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')
like image 185
Subin Avatar answered Dec 10 '25 15:12

Subin