Selecting keys based on metadata, possible with Amazon S3?

Posted by nbv4 on Stack Overflow See other posts from Stack Overflow or by nbv4
Published on 2010-05-06T07:21:08Z Indexed on 2010/05/06 7:28 UTC
Read the original article Hit count: 249

Filed under:
|
|

I'm sending files to my S3 bucket that are basically gzipped database dumps. They keys are a human readable date ("2010-05-04.dump"), and along with that, I'm setting a metadata field to the UNIX time of the dump.

I want to write a script that retrieve the latest dump from the bucket. That is to say I want the the key with the largest unix time metadata value. Is this possible with Amazon S3, or is this not how S3 is meant to work?

I'm using both the command line tool aws, and the python library boto

© Stack Overflow or respective owner

Related posts about amazon-s3

Related posts about boto