TExcelTAD
Home › AWS Cloud › S3 Storage Classes

S3 Storage Classes

Not all data is read equally often. Last week's invoices are opened daily; seven-year-old tax records almost never. S3 offers storage classes that trade a lower storage price for higher retrieval costs, minimum storage durations or slower access. All classes except One Zone-IA store data across multiple AZs and have the same eleven-nines durability design.

Class Use for Retrieval Notes
S3 Standard Frequently accessed data Milliseconds, no retrieval fee Default
S3 Intelligent-Tiering Unknown or changing access patterns Milliseconds Moves objects between tiers automatically; small monitoring fee per object
S3 Standard-IA (Infrequent Access) Read less than about once a month, needed fast Milliseconds, per-GB retrieval fee 30-day minimum, 128 KB minimum billable size
S3 One Zone-IA Re-creatable infrequent data Milliseconds, retrieval fee Stored in one AZ only
S3 Express One Zone Very low latency, high request rates Single-digit ms One AZ, directory buckets
S3 Glacier Instant Retrieval Archive read about once a quarter Milliseconds, higher retrieval fee 90-day minimum
S3 Glacier Flexible Retrieval Archive, minutes to hours is fine Minutes to hours 90-day minimum
S3 Glacier Deep Archive Long-term archive (compliance) Up to 12–48 hours Cheapest, 180-day minimum

You choose the class per object when uploading, or move objects later with lifecycle rules:

bash
aws s3 cp tax-2019.zip s3://tad-archive/tax/ --storage-class DEEP_ARCHIVE
aws s3api head-object --bucket tad-archive --key tax/tax-2019.zip --query StorageClass

Sample output:

text
"DEEP_ARCHIVE"

Model: monthly cost per class

This calculator uses example prices in the right order of magnitude (real prices vary by Region and change; check the AWS pricing pages). It includes storage, retrieval fees and the minimum billable object size.

python · try it yourself
# example prices: $/GB-month storage, $/GB retrieved
CLASSES = {
    "STANDARD":     {"store": 0.023,   "retrieve": 0.0,  "min_kb": 0,   "instant": True},
    "STANDARD_IA":  {"store": 0.0125,  "retrieve": 0.01, "min_kb": 128, "instant": True},
    "ONEZONE_IA":   {"store": 0.010,   "retrieve": 0.01, "min_kb": 128, "instant": True},
    "GLACIER_IR":   {"store": 0.004,   "retrieve": 0.03, "min_kb": 128, "instant": True},
    "DEEP_ARCHIVE": {"store": 0.00099, "retrieve": 0.02, "min_kb": 0,   "instant": False},
}
KB_PER_GB = 1024 * 1024

def monthly_cost(cls, objects, avg_kb, read_fraction):
    p = CLASSES[cls]
    stored_gb = objects * max(avg_kb, p["min_kb"]) / KB_PER_GB
    cost = stored_gb * p["store"]
    if cls == "DEEP_ARCHIVE":      # per-object index overhead: 8 KB in Standard + 32 KB in the archive
        cost += objects * (8 * CLASSES["STANDARD"]["store"] + 32 * p["store"]) / KB_PER_GB
    read_gb = objects * avg_kb / KB_PER_GB * read_fraction
    return cost + read_gb * p["retrieve"]

workloads = [   # name, objects, average KB, reads per month (fraction of data), must be instant?
    ("photos, read 3x/month", 2_000_000, 500, 3.0, True),
    ("monthly reports, read 0.2x", 50_000, 2048, 0.2, True),
    ("tiny thumbnails, rarely read", 5_000_000, 16, 0.05, True),
    ("tax archive, never read", 50_000, 2048, 0.0, False),
]
for name, n, kb, reads, instant in workloads:
    costs = {c: monthly_cost(c, n, kb, reads) for c in CLASSES}
    eligible = [c for c in CLASSES if CLASSES[c]["instant"] or not instant]
    best = min(eligible, key=costs.get)
    row = "  ".join(f"{c}=${v:,.2f}" for c, v in costs.items())
    print(f"{name}\n   {row}\n   cheapest usable: {best}")
photos, read 3x/month
   STANDARD=$21.93  STANDARD_IA=$40.53  ONEZONE_IA=$38.15  GLACIER_IR=$89.65  DEEP_ARCHIVE=$58.58
   cheapest usable: STANDARD
monthly reports, read 0.2x
   STANDARD=$2.25  STANDARD_IA=$1.42  ONEZONE_IA=$1.17  GLACIER_IR=$0.98  DEEP_ARCHIVE=$0.50
   cheapest usable: GLACIER_IR
tiny thumbnails, rarely read
   STANDARD=$1.75  STANDARD_IA=$7.67  ONEZONE_IA=$6.14  GLACIER_IR=$2.56  DEEP_ARCHIVE=$1.18
   cheapest usable: STANDARD
tax archive, never read
   STANDARD=$2.25  STANDARD_IA=$1.22  ONEZONE_IA=$0.98  GLACIER_IR=$0.39  DEEP_ARCHIVE=$0.11
   cheapest usable: DEEP_ARCHIVE

Four lessons from the model:

  1. Frequently read data is cheapest in Standard, because retrieval fees in the IA/Glacier classes add up.
  2. Rarely read data saves a lot in IA and Glacier classes.
  3. Tiny objects are a trap: with the 128 KB minimum, a 16 KB thumbnail is billed as 128 KB in Standard-IA, so the "cheaper" class costs more. Deep Archive's 40 KB per-object overhead is also bigger than the thumbnail itself.
  4. Deep Archive is by far the cheapest for data nobody needs quickly, but a read takes hours, so the model only considers it when instant access is not required.

Model: the minimum storage duration

Deleting or moving an object before the minimum duration still bills the remaining days:

python · try it yourself
MIN_DAYS = {"STANDARD": 0, "STANDARD_IA": 30, "GLACIER_IR": 90, "DEEP_ARCHIVE": 180}
PRICE = {"STANDARD": 0.023, "STANDARD_IA": 0.0125, "GLACIER_IR": 0.004, "DEEP_ARCHIVE": 0.00099}

def storage_cost(cls, gb, days_kept):
    billed_days = max(days_kept, MIN_DAYS[cls])
    return gb * PRICE[cls] * billed_days / 30

for cls in PRICE:
    print(f"{cls:<13} 100 GB kept 10 days: ${storage_cost(cls, 100, 10):6.3f}"
          f"   kept 365 days: ${storage_cost(cls, 100, 365):7.2f}")
STANDARD      100 GB kept 10 days: $ 0.767   kept 365 days: $  27.98
STANDARD_IA   100 GB kept 10 days: $ 1.250   kept 365 days: $  15.21
GLACIER_IR    100 GB kept 10 days: $ 1.200   kept 365 days: $   4.87
DEEP_ARCHIVE  100 GB kept 10 days: $ 0.594   kept 365 days: $   1.20

For data kept only ten days, Standard-IA and Glacier Instant Retrieval cost more than Standard, because you pay for 30 or 90 days anyway. Deep Archive is so cheap per GB that even 180 billed days cost little, but reading the data back takes hours. The colder classes are a bargain only for data you keep for a long time.

Intelligent-Tiering

If you can't predict access, Intelligent-Tiering watches each object: after 30 days without access it moves to an infrequent tier, after 90 days to an archive-instant tier, and back to the frequent tier as soon as it is read. There are no retrieval fees, just a small monitoring charge per object (objects under 128 KB are not monitored and stay in the frequent tier).

Test yourself

Which class stores data in a single Availability Zone?

  1. S3 Standard
  2. S3 Standard-IA
  3. S3 One Zone-IA
  4. S3 Glacier Deep Archive

Which class is the cheapest for compliance archives that are almost never read and can wait hours?

  1. S3 Standard
  2. S3 Intelligent-Tiering
  3. S3 Glacier Deep Archive
  4. S3 Express One Zone

Why can Standard-IA cost MORE than Standard for millions of 16 KB objects?

  1. IA has no durability
  2. IA bills each object as at least 128 KB
  3. IA charges per bucket
  4. It can't; IA is always cheaper