A few questions regarding Object Storage lifecycle policies

Linode Staff

A few questions regarding lifecycle policies on Object Storage:

  1. Can I set a life cycle policy to automatically delete partially completed or failed uploads within a day or two?
  2. Can I set a lifecycle policy for completed uploads that never deletes those files?
  3. Can I set a lifecycle policy for a single file?

1 Reply

While I'm no expert on Lifecycle policies for Object Storage, I've set up policies for a few of my buckets previously. If you haven't seen it yet, we have a great guide that covers setting lifecycle policies: How To Manage Objects with Lifecycle Policies. I highly recommend reading through that guide! As for your questions, I'll break them down below:

  1. Yes, you can delete failed uploads after a day or two through setting AbortIncompleteMultipartUpload and its child DaysAfterInitiation. In the following example (taken from our guide) failed uploads are deleted after 3 days. See Additional Actions section of the aforementioned guide.

  2. To keep objects indefinitely, don't set the Expiration directive in a lifecycle policy. This directive will automatically delete objects after a certain number of days, which sounds like something you don't want.

  3. Lifecycle policies are set on a per bucket level. I'm not aware of setting them per-file, but others may know of a workaround that I do not.

And just for your own knowledge, lifecycle policies can be managed through the command line through s3cmd or Cyberduck. You'll have more control using raw XML through s3cmd, but Cyberduck may be an easier tool depending on your experience.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct