S3 Lifecycle Rules
Automatic rules that transition objects between storage classes or expire (delete) them over time.
How it works
S3 Lifecycle Rules automate actions based on object or version age and can filter by prefix or tag. A transition moves eligible objects to another storage class; expiration handles objects that reach the specified age. In a versioning-enabled bucket, current-version expiration generally creates a delete marker instead of permanently deleting that version. You can separately configure removal of noncurrent versions and abortion of incomplete multipart uploads.
When to use it
Reduce storage cost by moving old data to cheaper classes and deleting data you no longer need.
Real-world example
A company sets a lifecycle rule for logs in a bucket without Versioning: transition them to S3 Glacier Flexible Retrieval after 30 days and expire them after 365 days. The team checks fees and minimum storage duration before applying it.
Key facts
- Transition actions and expiration actions.
- Can target a prefix or object tags.
- Can delete old versions (with versioning) and incomplete Multi-Part uploads.
Common pitfall
Do not assume current-version expiration removes every version in a versioning-enabled bucket. Configure a noncurrent-version action if eligible older versions should also be deleted.
Often confused with
S3 Intelligent-Tiering — lifecycle moves objects by age on a schedule you define.
References
Prepared by Cloud Quest. Check current behavior and limits in the AWS documentation:
Keywords you will see in SAA-C03 questions
- move to Glacier after 6 months
- delete after 365 days
- noncurrent versions
- incomplete multipart uploads
Understand it for real with 3D models and simulated labs
Connect the concept to a working architecture.