The built in Object Expiration is 1 day (plus the time to next midnight UTC). Is there a mechanism to do this at a more frequent basis? Given it appears that AWS does this across the board at midnight UTC then it's likely there would need to be another mechanism to delete objects sooner. We're looking for something in the 6-8 hour time frame. What other options if any would there be?
Thank you
S3's new Object Expiration function allows you to define rules to schedule the removal of your objects after a pre-defined time period. The rules are specified in the Lifecycle Configuration policy that you apply to a bucket. You can update this policy through the S3 API or from the AWS Management Console.
If you created a presigned URL using a temporary token, then the URL expires when the token expires. The URL expires even if the URL was created with a later expiration time.
You can temporarily disable a S3 Lifecycle rule. The following S3 Lifecycle configuration specifies two rules: Rule 1 directs Amazon S3 to transition objects with the logs/ prefix to the S3 Glacier Flexible Retrieval storage class soon after creation.
An S3 Lifecycle configuration is an XML file that consists of a set of rules with predefined actions that you want Amazon S3 to perform on objects during their lifetime. You can also configure the lifecycle by using the Amazon S3 console, REST API, AWS SDKs, and the AWS Command Line Interface (AWS CLI).
If 12 hours is an acceptable upper bound, then you can setup an S3 event notification to post a message to an SNS topic that has an SQS queue subscribed to the topic with a visibility timeout of the 6-8 hours you're looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With