Debabrata Patra
Debabrata Patra

Reputation: 548

S3 event when object expires due to Life-Cycle Rules

I have setup Life-Cycle Rules in S3 buckets to expire objects after X days. I found that there is a delay between the expiration date and the date at which Amazon S3 removes an object(source). Is there any S3 event available to know exactly when objects expire? There is a Delete Event in S3 which doesn't seem to work.

Thanks

Upvotes: 3

Views: 930

Answers (1)

Chris Williams
Chris Williams

Reputation: 35188

You can get the information of what day it will expire on via the following method.

To find when an object is scheduled to expire, use the HEAD Object or the GET Object API operations. These API operations return response headers that provide this information.

The delay is simply that it is in a queue and will only be processed when it is first in the queue.

See more: https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-expire-general-considerations.html

Upvotes: 1

Related Questions