How to manage lifecycle rules from the console
With the Scaleway console, you can change objects to a different storage class manually or automatically with lifecycle rules. These rules also allow users to set expiration dates for objects and object versions.
You may need certain IAM permissions to carry out some actions described on this page. This means:
- you are the Owner of the Scaleway Organization in which the actions will be carried out, or
- you are an IAM user of the Organization, with a policy granting you the necessary permission sets
- You have an account and are logged into the Scaleway console
- You have created an Object Storage bucket
How to create a lifecycle rule
-
Click Object Storage in the Storage section of the side menu. The list of your buckets displays.
-
Click the name of your bucket. The list of your objects displays
-
Click Lifecycle rules.
-
Click + Create Lifecycle rule to add a rule.
-
Enter a name for the rule.
-
Filter the objects you want the rule to be applied to by one or both of the following criteria:
- Prefix: based on the object name and path. The defined rule will be applied to all objects with the same name prefix.
- Tags: comprised of a key and an associated value. These tags should be defined prior to rule creation, for either a bucket or an object. You can add one or more tags to your filter.
How to configure transition rules
If you wish to change the storage class of two or more objects at a time, you can set up a transition rule that will automate the process.
-
Click «Toogle Icon» Change object class to transfer the current version of the objects to a different storage class.
-
Select the class.
-
Click - or + to set a deadline after which your rule’s current version will be transferred to another class. You can also directly type in the amount of days you wish to set for your deadline.
-
Click Next step to proceed.
-
Check that all settings are correct and click Create Lifecycle rule to confirm.
A list of the lifecycle rules displays.
How to configure expiration rules
If you wish to delete an object after a set number of days, you can set up an expiration rule that will automate the process.
-
Click «Toogle Icon» Delete after expiration to define when the current version of your objects will be deleted.
-
Click - or +, or type in the exact amount of days after the rule’s creation you want the current version to be deleted.
-
Click Next step to proceed.
-
Check that all settings are correct and click Create Lifecycle rule to confirm.
A list of the lifecycle rules displays.
How to disable a lifecycle rule
-
Click Object Storage in the Storage section of the side menu. A list of your buckets displays.
-
Click the name of your bucket.
-
Click the Lifecycle rules tab. A list of your rules displays.
-
Click «See more Icon» next to name of the rule.
-
Click Disable.
A confirmation window pops up.
-
Click Disable lifecycle rule if you wish to pursue the action.
Once disabled, the lifecycle rule remains listed and can be enabled again. Click «See more Icon» > Activate to do so.
If you wish to permanently delete a rule, click «See more Icon» > Delete.