对于我的 android 应用程序,我尝试将自定义端点与 amazon AWS SDK 一起使用,我添加了正确的 S3 存储桶名称、区域和凭据,但我收到了 403 AmazonS3Exception :
The request signature we calculated does not match the signature you provided. Check your key and signing method
我的代码:
BasicAWSCredentials creds = new BasicAWSCredentials(AccesKey, SecretKey);
amazonClient = new AmazonS3Client(creds, Region.getRegion(Regions.US_EAST_1));
amazonClient.setEndpoint(customEndPoint);
amazonClient.putObject(new PutObjectRequest(bucketName, fileKey, imageFile));
即使异常消息表明问题来自它们正确的密钥,并且可以肯定的是,我通过 CyberDuck 成功连接到存储桶。 是否需要添加特殊配置以使用自定义端点?