如何使用AWS Java SDK连接Complaint S3服务?

时间:2017-08-15 02:22:52

标签: java scala amazon-s3 openstack openstack-swift

我正在尝试实现一个简单的Java / Scala客户端来连接OpenStack Swift提供的S3服务(它支持S3 API)。 但是,当我使用AWS Java SDK 1.11.176时,代码似乎无效。 谁能和我分享一些灯?

谢谢!

$_POST

错误是这样的:

  

null(服务:Amazon S3;状态代码:400;错误代码:InvalidArgument;请求ID:null; S3扩展请求ID:null)   com.amazonaws.services.s3.model.AmazonS3Exception:null(服务:Amazon S3;状态代码:400;错误代码:InvalidArgument;请求ID:null; S3扩展请求ID:null),S3扩展请求ID:null       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1587)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.executeOneRequest(AmazonHttpClient.java:1257)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.executeHelper(AmazonHttpClient.java:1029)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.doExecute(AmazonHttpClient.java:741)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.executeWithTimer(AmazonHttpClient.java:715)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.execute(AmazonHttpClient.java:697)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutor.access $ 500(AmazonHttpClient.java:665)       在com.amazonaws.http.AmazonHttpClient $ RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:647)       在com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:511)       在com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4227)       在com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4174)       在com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4168)       在com.amazonaws.services.s3.AmazonS3Client.listBuckets(AmazonS3Client.java:918)       在com.amazonaws.services.s3.AmazonS3Client.listBuckets(AmazonS3Client.java:924)

0 个答案:

没有答案