Lifecycle Rule
Overview
Lifecycle rules for files/folders (Objects) must be clearly defined according to usage needs.
For example:
You need to upload a large amount of data and want these files to only exist for 90 days.
Enable versioning for the Bucket, but because the number of file versions is large, it takes up much storage space.
Multipart files are not fully uploaded, and parts of the files are still on the system, leading to a waste of storage space.
Managing Lifecycle rules will help you solve the above problems. In a Bucket, you can create multiple Lifecycle rules to apply only to folders or to all files and folders, depending on your needs.
Procedure
Step 1: Right-click into Bucket and choose Lifecycle rules
Step 2: Click on “New Rule” to create the Rules
Step 3: Setup the Rules you want to apply to your Bucket, and set the Days need to apply after choose the Rules then Click “Add New Rule”.
Permanently delete file: It will removes all versions of the object from the bucket, including any archived versions, making it unrecoverable once deleted.
Permanently deleting previous versions: It will removes older file versions from the bucket, ensuring they cannot be recovered, while the current version remains intact.
Noted: After xx days you set, S3 will delete all files that were created 60 days ago. It does not take into account the frequency of usage for these files.
Step 4: Click “Save” to apply the Rule to Bucket.