Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services AmazonS3与S3Client之间的差异_Amazon Web Services_Amazon S3_Aws Java Sdk - Fatal编程技术网

Amazon web services AmazonS3与S3Client之间的差异

Amazon web services AmazonS3与S3Client之间的差异,amazon-web-services,amazon-s3,aws-java-sdk,Amazon Web Services,Amazon S3,Aws Java Sdk,我正在尝试访问存储在s3存储桶中的pdf。 我有水桶的名字和阿恩。在经历了大量的示例之后,我不理解S3Client和AmazonS3这两种服务之间的区别 AmazonS3 s3Client = AmazonS3ClientBuilder.standard() .withRegion(Region.US_EAST_1) .withCredentials(new ProfileCredentialsProvider())

我正在尝试访问存储在s3存储桶中的pdf。 我有水桶的名字和阿恩。在经历了大量的示例之后,我不理解S3Client和AmazonS3这两种服务之间的区别

AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
                .withRegion(Region.US_EAST_1)
                .withCredentials(new ProfileCredentialsProvider())
                .build();

S3Client s3Client = S3Client.builder().region(Region.US_EAST_1).build();

没有使用什么?

AmazonS3是Java版本1,S3Client是Java版本2。强烈建议您继续使用Java版本2。要了解V1和V2之间的区别,请阅读本文档: