Management of temporary files, logs and other items will be a bit easier on Amazon S3. The company has just added object expiration, which allows developers set up rules for the automated deletion of files stored in S3.

Amazon recently added multi-object deletion, which speeds up the deletion of objects from an S3 bucket. However, multi-object deletion is capped at 1,000 objects (per request) and doesn’t get rid of files automatically.

With object expiration, developers can add rules for deleting files with a specific prefix (like documents/ or photos/) and set the expiration period (in days) for objects.

Note that you should not assume that files will be immediately removed the instant the expiration date hits. Amazon says that there may be “a small lag between the expiration date and the date at which Amazon S3 removes an object.” Amazon says that it won’t charge for storage of objects that have expired, but the actual removal may not take place immediately.

Amazon also says that buckets that are version-enabled can’t have object expiration as well. To start using the feature, check out the Working with Amazon S3 Objects developer guide on the AWS Documentation site.

joe brockmeier 1