Skip to content
Quest 05Intermediate14 min

Choose the Right Shelf

Cards are read constantly, sprites often, and tournament replays almost never — yet every replay must play the moment someone asks. S3 storage classes let you pay for exactly that.

What you'll learn

  • Every class except One Zone and Express One Zone keeps data across at least three Availability Zones; they differ in price, retrieval cost and retrieval time.
  • Infrequent-access and Glacier classes have minimum storage durations and per-GB retrieval charges.
  • Glacier Flexible Retrieval and Deep Archive need a restore before you can read the object.

Section 01

The shelves

ClassBest forFirst byteMinimum duration
STANDARDHot data read oftenMilliseconds—
INTELLIGENT_TIERINGUnknown or changing patternsMilliseconds (optional archive tiers need a restore)—
STANDARD_IARead about once a monthMilliseconds30 days
ONEZONE_IARe-creatable data, one AZMilliseconds30 days
GLACIER_IRRead a few times a year, needed instantlyMilliseconds90 days
GLACIERArchives you can wait minutes to hours forRestore: 1–5 min to 12 h90 days
DEEP_ARCHIVECompliance archives, rarely if ever readRestore: up to 12 h (48 h bulk)180 days

GLACIER is the API name for S3 Glacier Flexible Retrieval. Infrequent-access and Glacier Instant Retrieval bill a minimum of 128 KB per object.

Section 02

Minimums and retrieval fees

Cheaper storage comes with conditions. Delete a Standard-IA object after 10 days and you still pay for 30. Read a gigabyte from Standard-IA or Glacier Instant Retrieval and you pay a retrieval fee per GB. Small objects are billed as if they were 128 KB.

So the right class depends on the access pattern, not just the price per GB-month. For hot, small cards, STANDARD is often the cheapest in total.

Section 03

Restores

Objects in Glacier Flexible Retrieval and Deep Archive aren't directly readable: GetObject returns InvalidObjectState. Call RestoreObject to make a temporary copy readable for a number of days, and wait for the restore to finish.

Section 04

Intelligent-Tiering

If you can't predict access, Intelligent-Tiering moves each object between tiers for you: to an infrequent tier after 30 days without access and to an archive instant-access tier after 90, and back to frequent the moment it's read. It charges a small monitoring fee per object (objects under 128 KB aren't monitored or moved).

Practice

Your turn

Tournament battle replays are watched a few times a year, must start playing the moment someone clicks, and are kept for years. Choose the storage class that costs least for that pattern.

Set StorageClass on the upload.
Tab inserts two spaces. Press Escape, then Tab, to leave the editor. Control or Command plus Enter runs the code.
Simulated — no AWS calls

Check

Check your understanding

Quick Quiz · one question, as many tries as you need.

Raw sensor dumps can be regenerated from the source, are read about once a month, and must be available instantly. Which class fits best?

Choose one answer.