The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256

前端 未结 20 1564
既然无缘
既然无缘 2020-11-22 14:19

I get an error AWS::S3::Errors::InvalidRequest The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256. when I try upload fi

20条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 15:13

    For Android SDK, setEndpoint solves the problem, although it's been deprecated.

    CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
                    context, "identityPoolId", Regions.US_EAST_1);
    AmazonS3 s3 = new AmazonS3Client(credentialsProvider);
    s3.setEndpoint("s3.us-east-2.amazonaws.com");
    

提交回复
热议问题