I am storing many images in Amazon S3,
using a ruby lib (http://amazon.rubyforge.org/)
I don’t care the photos older than 1 week, then to free the space in S3 I have to delete those photos.
I know there is a method to delete the object in a certain bucket:
S3Object.delete 'photo-1.jpg', 'photos'
Is there a way to automatically delete the image older than a week ?
If it does Not exist, I’ll have to write a daemon to do that 🙁
Thank you
UPDATE: now it is possible, check the Roberto’s answer.
Unfortunately, Amazon doesn’t offer an API for automatic deletion based on a specific set of criteria.
You’ll need to write a daemon that goes through all of the photos and and selects just those that meet your criteria, and then delete them one by one.