Can Lifecycle Rules Match Object Suffixes to Delete Objects or Transition Them Between Storage Classes?
Currently, lifecycle rules do not support suffix matching. However, you can use either of the following methods to delete objects with specific suffixes or transition them between storage classes:
- Method 1: Use the prefix filter in a lifecycle rule.
Create a specific folder (for example, test/) in the bucket to store objects with the suffixes you want to target. When configuring the lifecycle rule, set the prefix to test/ to select these objects for deletion or storage class transition.
- Method 2: Use the tag filter in a lifecycle rule.
Add the same tag (for example, a tag with the key testobs and the value test) to all objects with the suffixes you want to target. When configuring the lifecycle rule, set the tag filter to the key testobs and the value test to select these objects for deletion or storage class transition.