You can use the lifecycle management feature when you need to change the storage class or delete specified objects regularly to reduce costs. COS will automatically change the storage class or delete specified objects within the specified time frame according to the rules you set. For more information, see Lifecycle Overview.
A lifecycle can be set to as long as 3,650 days.
Log in to the COS Console.
On the left sidebar, click Bucket List to enter the bucket list page.
Locate the bucket for which you want to enable the lifecycle feature. Click the bucket name to enter its details page.
Select Basic Configurations > Lifecycle, and click Add a Rule.
Add lifecycle rules as needed. The configuration items are described as follows:
Rule ID: enter a name for the lifecycle rule.
Applied to: the lifecycle rule can be applied to the entire bucket, or objects within a specified range as defined below:
Prefix and Object Tag can be specified at the same time.
Managing the current version: you can transition or delete the current version of an object using this option. It allows you to transition objects in your bucket from STANDARD to STANDARD_IA, ARCHIVE or DEEP ARCHIVE, and delete objects upon expiration.
From the hottest to the coldest, COS storage classes are STANDARD > STANDARD_IA > ARCHIVE > DEEP ARCHIVE. Objects can be transitioned only from a hotter storage class to a colder one, but not vice versa. Time is measured for a file starting from the moment it is modified (i.e., re-uploaded) in COS.
Managing historical versions: you can transition or delete previous versions of an object using this option. If it is not enabled, only the latest version of an object is processed by default.
Removing delete markers with no noncurrent versions: if an object has a delete marker as its latest version, with all of its noncurrent versions deleted, the delete marker will also be deleted once you enable this option. It cannot be enabled with the option to delete upon expiration under Managing the current version at the same time.
Deleting incomplete multipart uploads: allows you to delete expired incomplete multipart uploads that have failed due to any reason.
After the lifecycle rule is configured, click OK, and it will be listed instantly.
To stop using a lifecycle rule, click Edit under Operation, and change Status to Disable, or simply delete it.