我正在尝试获取 aws-publicdatasets 存储桶中用于 commoncrawl 的对象名称列表。我一直在研究使用 Jets3t 来 createSignedGetUrl 但我不确定是否可以通过以下方法获取对象列表:
credentials = new AWSCredentials(accessId, secretId);
restS3Service = new RestS3Service(credentials);
restS3Service.setRequesterPaysEnabled(true);
Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, cal.get(Calendar.HOUR)+1);
Date expiryDate = new Date(cal.getTimeInMillis());
String getUrl = restS3Service.createSignedGetUrl(bucketName, null,
expiryDate, false);
S3Object obj = signedUrlHandler.getObjectWithSignedUrl(getUrl);