amazon-web-servicesamazon-s3

How to list objects by extension from s3 api?


Can i somehow search objects in S3 by extension, not only by prefix?

Here is what i have now:

ListObjectsResponse r = s3Client.ListObjects(new Amazon.S3.Model.ListObjectsRequest()
{
    BucketName = BucketName,
    Marker = marker,
    Prefix = folder, 
    MaxKeys = 1000
});

So, I need to list all *.xls files in my bucket.


Solution

  • I don't believe this is possible with S3.

    The best solution is to 'index' S3 using a database (Sql Server, MySql, SimpleDB etc) and do your queries against that.