S3 Lifecycle Policies: SAA-C03 Study Guide

Amazon S3 Lifecycle configuration allows you to manage your objects so they are stored cost-effectively throughout their cycle. Instead of manually moving or deleting data, you define rules that automate transitions between storage classes or handle permanent deletion.

🏠 The Real-World Analogy: Think of managing your home. Fresh groceries go on the Counter (S3 Standard). After a few days, leftovers move to the Fridge (S3 Standard-IA). Items you rarely use move to the Attic (Glacier), and once they are expired or broken, they go to the Trash (Expiration).

Core Concepts & Configuration

A Lifecycle configuration is an XML file (or configured via Console/CLI) consisting of one or more rules. Each rule includes:

  • Filter: Defines which objects the rule applies to (Prefix, Object Tags, or minimum/maximum size).
  • Status: Enabled or Disabled.
  • Actions: What happens to the objects (Transition or Expiration).

1. Transition Actions

Defines when objects move to another storage class. Common paths include:

  • Standard → Standard-IA (Infrequent Access)
  • Standard → One Zone-IA
  • Standard-IA → S3 Glacier Flexible Retrieval or Deep Archive

2. Expiration Actions

Defines when objects expire. S3 deletes the expired objects on your behalf. This applies to:

  • Current versions of objects.
  • Non-current versions (if Versioning is enabled).
  • Incomplete Multi-part Uploads (Crucial for cost saving!).

Storage Class Comparison Table

Storage Class Min. Duration Min. Object Size Retrieval Fee Use Case
Standard None None None Active, frequently accessed data.
Standard-IA 30 Days 128 KB Per GB Long-lived, infrequently accessed.
Glacier Instant 90 Days 128 KB Per GB Archival data needing ms access.
Glacier Deep Archive 180 Days None Per GB Retaining data for 7-10 years (Compliance).

Decision Matrix / If–Then Guide

  • IF the requirement is to delete old versions of objects after 30 days → THEN use NoncurrentVersionExpiration.
  • IF data is rarely accessed but must be retrieved in milliseconds → THEN transition to S3 Glacier Instant Retrieval.
  • IF you need to minimize costs for logs that are never read after 90 days → THEN transition to S3 Glacier Deep Archive or Expire.
  • IF you are being charged for failed uploads → THEN use AbortIncompleteMultipartUpload rule.

Exam Tips and Gotchas

  • The 128KB Rule: You cannot transition objects smaller than 128KB to S3 Standard-IA or One Zone-IA. They will stay in the current class but you’ll be charged the higher rate.
  • The 30-Day Rule: Objects must be stored in S3 Standard for at least 30 days before they can transition to S3 Standard-IA or One Zone-IA.
  • Waterfall Effect: Transitions go “down” in cost/frequency. You cannot transition from Glacier back to Standard using Lifecycle policies (that requires a manual Restore).
  • Versioning: If versioning is enabled, remember that Lifecycle rules can manage “Current” and “Non-current” versions independently.

Topics covered:

Summary of key subtopics covered in this guide:

  • Transition vs. Expiration Actions
  • Filtering via Prefixes and Tags
  • Minimum storage durations (30/90/180 days)
  • Handling Multi-part uploads
  • Versioned bucket management
  • Cost optimization for small objects

S3 Lifecycle Visual Workflow

Automating the Data Journey

S3 Standard S3 Standard-IA S3 Glacier Expiration (X) 30 Days 90 Days

Ecosystem Integration

IAM: Control who can edit lifecycle configurations.
CloudWatch: Monitor BytesStorage metrics to see transitions in action.
KMS: Objects remain encrypted even after transitioning classes.

Cost Optimization

Production Case: A media company stores raw 4K footage. They move to Glacier after 30 days and delete after 1 year, saving 70% vs. keeping everything in Standard.

Scaling Performance

Lifecycle rules are processed once a day. There is no performance penalty for having thousands of rules, but try to use Prefixes to group objects logically for easier management.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top