Lesson 1 of 6 Amazon S3

Choosing S3 Storage Classes and Lifecycle Rules

This lesson explains how S3 storage classes trade price per GB against retrieval cost, speed and resilience, and how lifecycle rules move objects between classes automatically.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose a storage class from access needs.
  • Explain how lifecycle transition and expiration rules work.
  • Identify hidden costs from transitions and minimum durations.

Storage classes

S3 storage classes trade storage price against retrieval speed and cost, and every class except One Zone classes stores data across several Availability Zones. S3 Standard is for frequently accessed data, with millisecond access and no retrieval fee. S3 Intelligent-Tiering moves each object automatically between tiers according to its own access pattern: to an infrequent tier after 30 days without access, and to an archive instant tier after 90, with no retrieval fees and a small monitoring fee per object. It is the answer when the access pattern is unknown or changes.

S3 Standard-IA costs less to store but charges per gigabyte retrieved, bills each object for at least 30 days and 128 KB, and suits data read occasionally but needed immediately. S3 One Zone-IA is cheaper again because it keeps data in one Availability Zone, so data is lost if the zone is destroyed; it suits re-creatable data and secondary copies. S3 Express One Zone uses directory buckets in a single Availability Zone for the lowest latency and highest request rates, for workloads such as machine learning training.

The Glacier classes are for archives. Glacier Instant Retrieval still returns objects in milliseconds, for archives read about once a quarter. Glacier Flexible Retrieval and Glacier Deep Archive are cheaper, but objects must be restored before they can be read, which takes from minutes to hours, or up to 48 hours for Deep Archive, and they have minimum storage durations of 90 and 180 days. The following table summarises the classes.

ClassAccessMinimum durationNotes
S3 StandardMilliseconds—Frequent access, multi-AZ, no retrieval fee
S3 Intelligent-TieringMilliseconds (optional archive tiers slower)—Moves objects automatically (infrequent after 30 days, archive instant after 90); small monitoring fee, no retrieval fees; best for unknown or changing patterns
S3 Standard-IAMilliseconds30 daysRetrieval fee per GB; 128 KB minimum billable size
S3 One Zone-IAMilliseconds30 daysOne AZ: cheaper, lost if the zone is destroyed; for recreatable data or secondary copies
S3 Express One ZoneSingle-digit ms—Highest performance, directory buckets in one AZ
Glacier Instant RetrievalMilliseconds90 daysArchives accessed about quarterly
Glacier Flexible RetrievalExpedited 1–5 min, standard 3–5 h, bulk 5–12 h (free)90 daysMust be restored before reading
Glacier Deep ArchiveStandard within 12 h, bulk within 48 h180 daysCheapest; must be restored

The following diagram orders the storage classes by storage price.

The S3 storage classes ordered from the highest storage price and fastest access to the lowest storage price. S3 Standard suits frequent access, Intelligent-Tiering an unknown or changing pattern, Standard-IA and One Zone-IA occasional access with a retrieval fee, and the three Glacier classes archives, from millisecond retrieval in Glacier Instant Retrieval to hours in Deep Archive.
Retrieval works the other way round: the cheaper the storage, the slower or more expensive it is to read.

30days

Minimum storage duration billed for Standard-IA

128KB

Minimum object size billed for Standard-IA

48hours

Longest restore from Glacier Deep Archive

Scenario questions

Choosing a storage class

Exam skills 4.1.8 · 4.1.10

Choose the S3 storage class for each kind of data.

Log in to try this activity Interactive activities are free with an account.

Lifecycle rules

Lifecycle rules move objects between storage classes and delete them automatically, applying to objects selected by prefix or tag. Transition actions move objects to cheaper classes as they age, and expiration actions delete objects, noncurrent versions, expired delete markers and incomplete multipart uploads.

Some constraints apply: objects must spend at least 30 days in S3 Standard before moving to Standard-IA or One Zone-IA. To choose good rules, S3 Storage Lens shows usage and activity across the organisation, and Storage Class Analysis observes how often objects in a bucket are accessed and recommends when to move them to Standard-IA.

The following diagram shows a typical rule as a timeline.

A lifecycle rule as a timeline. New objects start in S3 Standard, move to Standard-IA after 30 days, the earliest allowed, then to Glacier Flexible Retrieval after 90 days, and are deleted after a year. The same rule can expire noncurrent versions and abort incomplete multipart uploads.
The days are illustrative, except that an object must stay in Standard for at least 30 days before moving to an IA class.
True or false

Lifecycle rules

Exam skills 4.1.5 · 4.1.9

Check how S3 Lifecycle rules work.

Log in to try this activity Interactive activities are free with an account.
Worked example

Logs queried often for 30 days, occasionally for a year, and kept for seven years:

  1. Days 0 to 30

    S3 Standard.

  2. Days 31 to 365

    S3 Standard-IA or Glacier Instant Retrieval.

  3. After one year

    Glacier Deep Archive.

  4. After seven years

    Expire the objects.

Hidden costs

Each transition request is charged, and IA and Glacier classes have minimum durations and billable sizes, so moving millions of tiny or short-lived objects can cost more than leaving them. Intelligent-Tiering does not monitor or move objects smaller than 128 KB, which stay in its frequent access tier.

Check yourself

Which storage class suits data whose access pattern is unknown?

Show answer

S3 Intelligent-Tiering, which moves each object between tiers automatically based on its access, with no retrieval fees.

Exam Tips

Remember for the exam

  • For unpredictable access patterns, use Intelligent-Tiering.
  • For infrequent but immediate access that must survive the loss of a zone, use Standard-IA; for data that can be recreated, use One Zone-IA.
  • For archives accessed quarterly that need millisecond access, use Glacier Instant Retrieval.
  • For the cheapest long-term archive, where retrieval in 12 to 48 hours is acceptable, use Glacier Deep Archive.
  • The minimum storage durations are 30 days for the IA classes, 90 days for Glacier Instant and Flexible Retrieval, and 180 days for Deep Archive.
  • For millions of tiny objects, transition charges and minimum sizes can outweigh the savings.