INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: S3: versions, retention, replication and cost

S3 Lifecycle explained: storage transitions and version expiration

S3 Lifecycle applies rules to transition eligible objects between storage classes or expire them. “Make old data cheaper” is incomplete: identify the target version, age, action and cost, including how long recovery can take.

What you will learn

Distinguish transitions, expiration, current/noncurrent versions, delete markers and incomplete multipart uploads; explain how to review a rule against retention needs.

Prerequisite

Know S3 keys and Versioning. The synthetic example uses an enabled general purpose bucket without protections that prevent deletion. The figure illustrates eligible actions, not their exact execution times or a real deletion.

First distinguish what should remain from what may expire

A transition changes storage class; expiration concerns removal. A new rule also applies to eligible existing data. In a general purpose bucket, a bucket-policy Deny does not stop Lifecycle actions. Review the affected data before enabling a rule.

Current and older versions under one key have different actions
Current and older versions under one key have different actions1: Current data vB — If current-version expiration applies, a marker is added rather than deleting every data version. — Current marker. 2: Noncurrent data vA — If NoncurrentVersionExpiration conditions are met; a different target from the upper row. — vA removed12Current data vBCurrent markerNoncurrent data vAvA removedCurrent and older versions under one key have different actions1: Current data vB — If current-version expiration applies, a marker is added rather than deleting every data version. — Current marker. 2: Noncurrent data vA — If NoncurrentVersionExpiration conditions are met; a different target from the upper row. — vA removed12Current data vBCurrent markerNoncurrent datavAvA removed
  1. Current data vB → Current markerIf current-version expiration applies, a marker is added rather than deleting every data version.
  2. Noncurrent data vA → vA removedIf NoncurrentVersionExpiration conditions are met; a different target from the upper row.
Current data vB
Data selected by an ordinary read.
Current marker
Current expiration adds a marker; vB becomes noncurrent.
Noncurrent data vA
Age is measured from becoming noncurrent.
vA removed
Noncurrent expiration permanently removes that version.

Choose an option to see the result and explanation.

Only current-version Expiration applies to a current data version in an enabled bucket. Does it remove all older versions?
Read the answer and reason

Answer: No; it adds a current marker and older versions need separate management · In the upper track vB remains noncurrent. Removing noncurrent versions is a separate action with its own retention conditions and permanent effect.

Read the filter and the age being measured

Read the rule beyond its name
FieldMeaning
FilterSelects by prefix, tags or size; an empty filter covers the bucket
Current-version DaysAge from creation of that object version
NoncurrentDaysAge since the version became noncurrent
Newer noncurrent versions to retainWhen configured, review both age and retained-count conditions and the Filter requirement

The day draft vA was stored differs from the day final vB superseded it. The noncurrent age of vA starts when its successor vB is created. Days does not generally mean time since the last read. Eligibility uses UTC date boundaries, and physical processing is asynchronous.

Choose an option to see the result and explanation.

vA was created 100 days ago but became noncurrent when vB was created 2 days ago. Which age matters to NoncurrentDays?
Read the answer and reason

Answer: The 2 days since becoming noncurrent · Separate noncurrent retention from time since initial creation. Actual eligibility also depends on UTC rounding and any other configured conditions.

Separate data versions, markers and incomplete uploads

Different cleanup targets
TargetAction and caution
Current versionUnversioned: permanent deletion; enabled: normally add a marker; suspended: consider replacement of a null version
Noncurrent versionNoncurrentVersionExpiration permanently deletes it; choose retention separately
Expired object delete markerCleanup targets a marker after no data versions remain
Incomplete multipart uploadAbortIncompleteMultipartUpload is separate from expiration of completed objects

A multipart upload sends data in separate parts. Those parts may remain even though an incomplete upload has not produced a completed object. AbortIncompleteMultipartUpload removes the incomplete parts, not completed objects. Its rules cannot use tag-based filters.

Choose an option to see the result and explanation.

You need to clean up parts from incomplete multipart uploads. Is ordinary object Expiration sufficient?
Read the answer and reason

Answer: No; review the dedicated incomplete-multipart action · Completed objects and parts of incomplete uploads are distinct targets. Read the action, not just its rule name or age.

Separate supported transitions from cost-effective transitions

Current Lifecycle configurations do not transition objects smaller than 128KB by default. Explicit size filters can alter eligibility, but per-object transition charges can outweigh savings. Older configurations may retain pre-September-2024 defaults, so inspect the actual configuration.

Do not select a storage class by storage rate alone. S3 Glacier Flexible Retrieval and Deep Archive require restoration before reading. Moving immediately needed data there changes the application access model. Supported onward transitions also depend on the source class.

Selected minimum storage durations; also check current pricing
Storage classMinimum storage duration
Standard-IA / One Zone-IA30 days
Glacier Instant Retrieval / Flexible Retrieval90 days
Glacier Deep Archive180 days

Choose an option to see the result and explanation.

Does a lower storage rate guarantee that transitioning immediately is cheaper?
Read the answer and reason

Answer: No; compare transition counts, retention and retrieval needs too · Other costs and access conditions change. Short retention or many small objects can make storage-rate comparisons misleading.

Separate eligibility from completed processing

Eligibility is not a guarantee of instant completion. Distinguish queued work from ineligible data or incorrect rules. An ordinary object listing does not cover older versions or incomplete uploads. Billing changes do not always coincide with physical processing; Intelligent-Tiering transitions have a specific exception.

  1. Define retention, recovery window and immediate-access needs.
  2. Identify filters, versioning state and whether targets are current versions, older versions or parts.
  3. Choose transition, expiration or abort; review age and storage-class conditions.
  4. Review cost and permanent-deletion effects, then verify the relevant versions and results.

Check, then explain in your own words

  1. Choose targets and retention.
  2. Separate current and noncurrent age.
  3. Distinguish transitions, expiration and aborts.
  4. Review costs and completion evidence.
Check your understanding: Does current-version expiration remove all older data and storage charges?

No. Review versioning state, retained versions, separate expiration actions and minimum-duration charges.

An object becoming invisible to an ordinary read is different from permanent removal of all versions; processing and billing each have conditions.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.