Object storage and the S3 storage classes

What object storage is for, the Amazon S3 storage classes ordered by how often the data is read and how fast it has to come back, and the four defaults that decide most S3 questions before you reach the options.

Lesson 7 of 11 in objective 3. Cloud technology and services, part of AWS Certified Cloud Practitioner (CLF-C02).

The S3 classes, ordered by how often the data is read. A range from Read constantly to Read twice a year. S3 Standard: instant, no retrieval fee. Standard-IA: instant, retrieval charged. Glacier Flexible Retrieval: minutes to hours. Glacier Deep Archive: hours, cheapest storage. Read constantly Read twice a year S3 Standard instant, no retrieval fee Standard-IA instant, retrieval charged Glacier Flexible Retrieval minutes to hours Glacier Deep Archive hours, cheapest storage
The S3 classes, ordered by how often the data is read.

Where object storage fits, and where it does not

S3 stores objects in a flat namespace of buckets and keys, reached over an HTTP API, with capacity that is never provisioned. An object is written and replaced as a whole, which is the property that decides the classic wrong answer on this objective: a database updates a few bytes in the middle of a large file constantly, and object storage simply has no such operation. That mismatch is fundamental rather than a matter of configuration, and no amount of versioning, Availability Zone alignment or bucket policy changes it.

The corollary is the positive case. Anything written once and read many times — media files, backups, logs, static website content, the files a data lake is made of — fits object storage perfectly, and the effectively unlimited capacity is what makes it the default landing place for data whose eventual size nobody knows.

Three storage shapes, told apart by how the application reaches the data. Object — S3 — How you reach it: An HTTP API, by bucket and key; What one write touches: The whole object, replaced as a unit; How many machines: Any number, over the network; Right for: Media, backups, logs, static sites, data lakes. Block — EBS, instance store — How you reach it: A raw volume the operating system formats; What one write touches: A few bytes, in place; How many machines: One instance; Right for: Boot volumes and databases. File — EFS, FSx — How you reach it: A mounted file system, with POSIX or SMB permissions; What one write touches: Part of a file, in place; How many machines: Many at once; Right for: A shared directory a fleet reads and writes Object — S3 Block — EBS, instance store File — EFS, FSx How you reach it An HTTP API, by bucket and key A raw volume the operating system formats A mounted file system, with POSIX or SMB permissions What one write touches The whole object, replaced as a unit A few bytes, in place Part of a file, in place How many machines Any number, over the network One instance Many at once Right for Media, backups, logs, static sites, data lakes Boot volumes and databases A shared directory a fleet reads and writes
Three storage shapes, told apart by how the application reaches the data.

Choosing a class: two questions, in that order

How often is it read, and how long may it take to come back? Those two questions order the whole family. S3 Standard is for data read often and returned instantly, with no retrieval fee. Standard-IA and One Zone-IA are priced for data read perhaps monthly that must still come back instantly. Glacier Instant Retrieval sits below them for data touched about quarterly. Glacier Flexible Retrieval returns in minutes to hours, and Glacier Deep Archive — the cheapest storage of all — in hours.

Every class below Standard adds two things: a per-gigabyte retrieval charge and a minimum storage duration, which is thirty days for the infrequent-access classes, ninety for Glacier Flexible Retrieval and one hundred and eighty for Deep Archive. Deleting early is still billed for the remainder, which is why an archive class is wrong for data with a short life and irrelevant as an objection when a regulator has asked for seven years. And One Zone-IA is the one class that keeps its single copy in a single Availability Zone: right for data that is reproducible or is a second copy of something else, wrong for anything that exists nowhere else.

Intelligent-Tiering, and when it is the wrong answer

S3 Intelligent-Tiering watches each object's access pattern and moves it between access tiers itself, which makes it the answer to "nobody can say in advance which of these files will be read again". It charges a small monitoring and automation fee per object and no retrieval fee for its frequent and infrequent access tiers, so an object that turns out to be read daily is not punished for a rule somebody guessed.

Knowing when it is wrong is what makes it a choice rather than a default. Because the monitoring fee is per OBJECT, a bucket of many millions of very small files can spend more on monitoring than tiering saves. And when the pattern IS known — logs that are useless after ninety days — an explicit lifecycle rule is the better tool. The trade the exam draws is exactly that: automatic tiering for an unpredictable pattern, a lifecycle rule for a predictable one, and a fixed age is the wrong signal for data whose age says nothing about whether it is still being read.

What S3 does without being asked

Four defaults carry an unreasonable number of marks. Capacity is elastic and billed by what is stored, so a bucket is never sized. Buckets and objects are PRIVATE until somebody deliberately grants access, which is why an exposed bucket is always a customer configuration decision. Objects are stored redundantly across several Availability Zones in the bucket's Region — a bucket belongs to a Region and never to a zone — with One Zone-IA as the single exception. And a lifecycle rule changes an object's storage class in place, on a schedule you define, without any data leaving S3.

Versioning is the fifth thing worth switching on and the one a question about a bad script is fishing for: with versioning enabled an overwrite creates a new version and a delete adds a marker, so the previous content is still there to restore. Taken together these are the shared responsibility model in miniature — AWS keeps the object durable, you decide who may read it.

aws s3api head-object --bucket logs --key app.gz    "StorageClass": "STANDARD"aws s3 cp s3://logs/app.gz s3://logs/app.gz --storage-class GLACIERnothing was downloaded and nothing left S3aws s3api head-object --bucket logs --key app.gz    "StorageClass": "GLACIER"
Moving an object to a colder class without moving the object.

Worth carrying in

Bucket
Belongs to one Region. Private by default, and never sized in advance.
S3 Standard
Read often, returned instantly, no retrieval fee. The most expensive home for cold data.
S3 Intelligent-Tiering
Moves objects between tiers on observed access. Per-object monitoring fee.
S3 Standard-IA
Read about monthly, still instant. Retrieval charged; thirty-day minimum.
S3 One Zone-IA
The same, in ONE Availability Zone. For reproducible or secondary copies only.
S3 Glacier Instant Retrieval
Archive pricing with instant access, for data touched about quarterly.
S3 Glacier Flexible Retrieval
Minutes to hours to retrieve; ninety-day minimum.
S3 Glacier Deep Archive
Cheapest storage, hours to retrieve, one-hundred-and-eighty-day minimum.
Lifecycle rule
Changes an object's class, or expires it, on a schedule. In place; no data moves out of S3.
Versioning
Keeps previous versions and turns a delete into a marker. The defence against a bad script.

What the exam does with this

Objective
3. Cloud technology and services
Share of the exam
34% (the whole objective)
Questions in this lesson
5
Signed for by a person
0

Partly checked. None of the 5 questions here has been read against the cited source by a person. 5 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.

Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.

Questions in this lesson

Drill this lesson

A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.

Practise Object storage and the S3 storage classes

The rest of objective 3