Docs Ordnary Web Services Ordnary R2
Lifecycle rules
Deleting objects after a number of days, moving them to Infrequent Access, and cleaning up abandoned multipart uploads.
A lifecycle rule does something to objects automatically once they reach an age. Rules live under the bucket's Settings, Object lifecycle rules, and each one can be limited to a prefix and switched on or off.
Actions
| Action | What it does | Typical use |
|---|---|---|
| Delete objects | Removes objects after the number of days since they were uploaded. | Logs, exports, temporary files. |
| Move to Infrequent Access | Changes the storage class after the number of days. The object stays where it is. | Media and backups that are read a lot at first and rarely later. |
| Abort incomplete multipart uploads | Removes parts of uploads that never completed after the number of days. | Every bucket that receives large uploads; abandoned parts are billed as storage. |
A rule
Prefixtext- Only objects whose key starts with it, such as
logs/. Leave empty for the whole bucket. ActionchoiceRequired- One of the three actions above.
After (days)numberRequired- Counted from the object's upload, or for multipart uploads from when they started.
Enabledtoggle- A rule can be kept but switched off.
Rules run in the background; an object past its age disappears or changes class within a day, not at the exact minute. Objects under a lock rule are not deleted until the retention has passed.