Skip to content
Draft: this topic has not been reviewed yet. Check facts against the linked AWS documentation before relying on them.

S3 storage classes and lifecycle rules

Solutions Architect – Associate · Domain 4 · Design Cost-Optimized ArchitecturesTask 4.1: Design cost-optimized storage solutionsTask 3.1: Determine high-performing and/or scalable storage solutionsLevel 218 minDraft
Difficulty
Confidence

Not all data is used the same way. Last week’s photos are viewed constantly; tax records from 2019 are almost never opened. S3 lets you pay less for data you rarely read by giving every object a storage class.

Each class trades storage price against how quickly and cheaply you can get the data back.

The storage classes

Class Best for Retrieval Notes
S3 Standard Frequently accessed data Milliseconds The default; highest storage price, no retrieval fee
S3 Intelligent-Tiering Data with unknown or changing access patterns Milliseconds for the frequent and infrequent tiers S3 moves objects between tiers for you; small monitoring fee, no retrieval fees
S3 Standard-Infrequent Access (Standard-IA) Data read rarely but needed fast when it is Milliseconds Lower storage price, plus a fee per GB retrieved
S3 One Zone-Infrequent Access Infrequently used data you can re-create Milliseconds Stored in one Availability Zone, so cheaper but lost if that AZ is destroyed
S3 Glacier Instant Retrieval Archives read about once a quarter Milliseconds Archive pricing with instant access
S3 Glacier Flexible Retrieval Archives read once or twice a year Minutes to hours Very low storage price
S3 Glacier Deep Archive Long-term records kept for years, for example for compliance Within hours (up to about 12) The lowest storage price on AWS

All classes except One Zone-IA store data across multiple Availability Zones.

The infrequent access and Glacier classes also have a minimum storage duration. If you delete an object early, you still pay for the minimum period, so they suit data you will keep for a while.

How to choose

  1. Is the data used often? → S3 Standard.
  2. Do you not know how often it will be used? → S3 Intelligent-Tiering.
  3. Rarely used, but needed instantly when it is? → Standard-IA (or One Zone-IA if you can re-create it).
  4. Archive you may need instantly a few times a year? → Glacier Instant Retrieval.
  5. Archive where waiting minutes or hours is fine? → Glacier Flexible Retrieval, or Glacier Deep Archive for the lowest price.

Lifecycle rules: automatic moves

Moving objects between classes by hand would be tedious. A lifecycle rule does it automatically based on age, and can also delete objects you no longer need.

Example for application logs:

  1. Day 0–30: S3 Standard, because engineers often look at recent logs.
  2. After 30 days: move to S3 Standard-IA.
  3. After 1 year: move to S3 Glacier Deep Archive.
  4. After 7 years: delete, because the retention requirement has ended.

Lifecycle rules are a classic way to cut storage costs without changing your application.

Putting it together: a hospital’s records

A hospital keeps patient scans.

  • New scans are viewed often for a few weeks: S3 Standard.
  • After 90 days they are rarely viewed but must open quickly if a doctor asks: Standard-IA.
  • After two years they are kept only to meet legal rules: Glacier Deep Archive.
  • A lifecycle rule handles all of it automatically.

Common mix-ups

  • One Zone-IA is less resilient. It keeps data in a single AZ; use it only for data you can re-create.
  • Glacier is not always slow. Glacier Instant Retrieval returns data in milliseconds; Flexible Retrieval and Deep Archive take minutes to hours.
  • Cheaper storage can cost more to read. Infrequent access and archive classes charge for retrieval, so they are wrong for data you read often.

Check yourself

A company does not know how often its data will be accessed. Which storage class avoids guessing?

S3 Intelligent-Tiering, which moves objects between access tiers automatically.

Which class has the lowest storage price for records kept for seven years and almost never read?

S3 Glacier Deep Archive.

How can objects move to a cheaper class automatically after 30 days?

With an S3 lifecycle rule.

Why would you avoid One Zone-IA for your only copy of important data?

It stores data in a single Availability Zone, so the data could be lost if that AZ were destroyed.

Exam tip for Cloud Practitioner

“Archive”, “rarely accessed” and “lowest cost” usually point to an S3 Glacier class; “lowest cost of all” is Deep Archive. “Access pattern unknown” points to S3 Intelligent-Tiering. “Automatically move or delete objects by age” is a lifecycle rule.

Key takeaways

  • Storage classes trade storage price against retrieval speed and cost.
  • Standard for hot data, Intelligent-Tiering when unsure, IA for rarely used data, Glacier classes for archives.
  • Lifecycle rules move and delete objects automatically to save money.

Cloud Study Lab is an independent study site. It is not affiliated with or endorsed by Amazon Web Services. AWS and the names of AWS certifications are trademarks of Amazon.com, Inc. or its affiliates.