|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
Some objects that you store in an Amazon S3 bucket might have a well-defined lifetime. For example, you might be uploading periodic logs to your bucket, but you might need to retain those logs for a specific amount of time. You can use using the Object Lifecycle Management to specify a lifetime for objects in your bucket; when the lifetime of an object expires, Amazon S3 queues the objects for deletion.
Note that upon expiration Amazon S3 deletes these objects, no matter whether they are in Amazon S3 or archived to Amazon Glacier. Even if the objects are archived, Amazon S3 will remove archived objects. Amazon S3 will also delete any temporary copy of an archived object you might have restored (see Restoring Archived Objects).
When an object reaches the end of its lifetime, Amazon S3 queues it for removal and removes it asynchronously. There may be a lag between the expiration date and the date at which Amazon S3 removes an object. You are not charged for storage time associated with an object that has expired.
Whenever you overwrite an object, Amazon S3 resets its creation date and time to the date and time you updated the object. Accordingly, Amazon S3 also updates the object's expiration date from this new creation date and time.
To find when an object is scheduled to expire, you can use the GET Object or the HEAD object APIs. These APIs return response headers that provide object expiration information. For more information, go to HEAD Object and GET Object in the Amazon Simple Storage Service API Reference.
To find when an object was removed by Amazon S3, you can use Amazon S3 server access logs. The value "S3.EXPIRE.OBJECT" of the operation field in the log record indicates that Amazon S3 initiated the operation. For more information, see Server Access Logging.
You can delete objects by explicitly calling the DELETE Object action or by creating a
lifecycle configuration so that Amazon S3 will remove them for you. If you want to block
users or accounts from removing or deleting objects from your bucket, you must deny them
permission to call the
For examples, see Object Lifecycle Management.