Last updated: 2019-09-23 16:19:47PDF
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 a maximum of 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.
- Click Basic Configuration on the top, scroll down to Lifecycle and then click Add Rules.
- Add lifecycle rules as needed. The configuration items are described as follows:
- Rule Name: Enter a name for the lifecycle rule.
- Applied to: This lifecycle rule can be applied to the entire bucket or objects with a specific prefix in the bucket, such as examplevault. If you select Specified Prefix, you need to enter a prefix.
- Prefix: For more information on object keys (or prefixes), see Object Overview. For more information on the configuration rules for the lifecycle, see Rule Description.
- Manage current version: You can transition or delete objects in the current version by enabling Manage current version. You can transition the objects in a bucket from COS Standard to COS Infrequency Access or Archive Storage, and delete the objects upon their expiration.
Storage classes include COS Standard > COS Infrequent Access > Archive Storage (from hot storage to cold storage). Storage classes can only be changed from hot to cold. Calculation of days is based on the modification time of files in COS.
- Manage previous versions: You can transition or delete objects of previous versions by enabling Manage historical versions. If it is not enabled, only objects of the latest version are processed by default.
- Clean up expired object delete markers: If you delete certain version of an object, all previous ones of this version will expire, and the delete markers for the expired objects are retained. Although the delete markers do not incur storage costs, the removal of them can improve the performance of
- Delete incomplete multipart uploads: If some parts of the files fail to be uploaded due to some reasons, you can use this feature to delete the parts associated with these multipart uploads periodically.
- After the lifecycle rules are configured, click OK and you will see the lifecycle rules.
- When you want to disable a lifecycle rule, click Edit to change the status of the rule to Disable or delete the lifecycle rule.