shantanuo
shantanuo

Reputation: 32296

Finding files in Buckets

I have saved several daily files in various buckets. The file name has a fixed format but the bucket does not. The file name is company_raw_date.tgz like...

company_raw_2010-12-03.tgz
company_raw_2010-12-04.tgz
company_raw_2010-12-05.tgz
company_raw_2010-12-06.tgz

But the bucket can be s3://sales/december or s3://archive/company The same name can be found in several buckets and the data may or may not be the same.

My question is how do I search across all buckets for a given date and download all files found along with their bucket names.

Upvotes: 0

Views: 218

Answers (2)

Keshi
Keshi

Reputation: 1086

AWS's all SDKs have support for getting the list of buckets configured as a part of your account. If you want an easier way follow the REST call as follows:

   GET / HTTP/1.1
   Host: s3.amazonaws.com
   Date: date
   Authorization: signatureValue

See http://docs.amazonwebservices.com/AmazonS3/2006-03-01/API/RESTServiceGET.html for more information.

Upvotes: 0

Sangram Anand
Sangram Anand

Reputation: 10844

Is it from a webapplication that you want to download the s3 files. If so, AWS java SDK is there to meet your requirements.

I did the same for my java struts2 webapplication.

Upvotes: 1

Related Questions