bji / libs3

Other
154 stars 151 forks source link

Force V4 authorization for us-east-2 #76

Open LorneFlindall opened 6 years ago

LorneFlindall commented 6 years ago

Using libs3 in us-east-1, us-west-1 and 2 work for us, but us-east-2 fails. We get Error: S3 Copy Failed : The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

Is there a way to force V4 authorization for these newer regions. The following regions don't support Signature Version 2. You must use Signature Version 4 to sign API requests in these regions:

US East (Ohio) Region Canada (Central) Region Asia Pacific (Mumbai) Region Asia Pacific (Seoul) Region EU (Frankfurt) Region EU (London) Region China (Beijing) Region

aghiles commented 6 years ago

Make sure you are you are correctly setting the bucket_context.authRegion (in your case, set it to "us-east-2"). Not setting that member will cause these kind of errors in V4 environments.