Lifecycle Settings: Creating a Rule

Prev Next

To create a lifecycle rule:

  1. On the Buckets list, clickfor the desired bucket.
  2. Click Settings.
  3. Click the Lifecycle tab. The Lifecycle Policy panel is displayed. In this example, no lifecycle policy is defined yet:

    The lifecycle feature is supported only for new buckets. Create a new bucket to create and apply lifecycle rules.
  4. Click Create New Rule. The Lifecycle Rule Settings panel is displayed.

  5. Enter a name for the Lifecycle rule.
  6. Choose the scope of the rule. You can:
    — Limit the scope of the rule by using filters. Continue with Step 7.
    — Apply the rule to all objects in the bucket. Skip to Step 8.

  7. Filter options are provided when you choose to limit the scope of the rule. You can filter by a name prefix and/or the size of the object. For size, you can enter the minimum and/or maximum size in bytes, kilobytes, megabytes, or gigabytes. 

    For more information about tags, refer to Object Tags.

    After you enter your filter information, continue with Step 8.

  8. Check at least one of the Action options. Follow the on-screen instructions for the selected option(s), as described below in Lifecycle Rule Actions.

  9. Click Create.

A rule list is displayed. Each rule is shown with its name, status, scope, and action information. For example:

Lifecycle Rule Actions

Each rule action is described below.

Expire current versions of objects

To expire the current versions of objects, specify when the objects become noncurrent. Either:

  • Enter a value indicating the number of days after object creation, or
  • Select a date in the calendar.

For versioned buckets, a delete marker is added and the current version of an object is retained as a noncurrent version. For non-versioned buckets, the object is permanently removed at the end of the specified period.

If you enable this action, you cannot enable the "Delete expired object delete markers."

Permanently delete noncurrent versions of objects

To permanently delete previous versions of objects, enter a value indicating the number of days after which objects become noncurrent.

Optionally, you can enter a value to specify the number of newer versions to retain.

Delete expired object delete markers

This action is not supported when filtering by object size.

This action removes expired object delete markers. An expired object delete marker is removed if all noncurrent versions of an object expire after deleting a versioned object.

If you enable this action, you cannot enable the "Expire current versions of objects."

Delete incomplete multipart uploads

This action is not supported when filtering by object size.

By default, Lifecycle will abort all incomplete multipart uploads after 31 days. To delete/abort it early, you need to create a new rule. This rule will be applied to all new incomplete multipart uploads created after the rule is set.

To delete incomplete multipart uploads, enter a value indicating the number of days after which you want to end the multipart upload initiation and clean up incomplete multipart uploads.

This action will stop all incomplete multipart uploads and delete the parts associated with the multipart upload.