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).
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.
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"
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
- Two questions settle every storage-class item: how often is it read, and how long may it take to come back. Everything below Standard adds a retrieval charge and a minimum storage duration.
- One Zone-IA is the only class holding a single copy in one Availability Zone. Right for data you could regenerate, wrong for anything that exists nowhere else.
- Intelligent-Tiering is for a pattern nobody can predict; a lifecycle rule is for one you already know. "Nobody can say which files" is choosing between exactly those two.
- Buckets are private until made otherwise and capacity is never provisioned. Both appear as false statements in choose-two questions, and both sound plausible if you have only used EBS.
- A database cannot live on S3, and the reason is the write, not the permissions: objects are replaced whole, and a database changes a few bytes in place.
- 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
- A regulator requires seven years of transaction logs to be retained. They are read at most twice a year during an audit, and the auditor is content to be told the files will be available the following working day. Which S3 storage class is cheapest while still meeting this? machine-checked
- A data science bucket holds 60 TB of large files. Some are read every day for a month and then never again; others are read at unpredictable intervals for years. Nobody can say in advance which is which, and the team does not want to own and maintain a set of lifecycle rules. Which storage class fits? machine-checked
- A pipeline generates preview images from master files that are stored elsewhere and backed up. The previews are read rarely, and if they were all lost they could be regenerated by rerunning the pipeline for about an hour. Which storage class is the right economic choice? machine-checked
- A team wants to cut storage costs by putting their self-managed database's data files in Amazon S3, so the database engine reads and writes them there in place. What should they be told? machine-checked
- A team is about to put customer documents into Amazon S3 for the first time. Which TWO statements are true and should shape the design? machine-checked
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
- Ways in: console, CLI, SDKs and infrastructure as code
- Regions, Availability Zones and edge locations
- EC2 and choosing an instance type
- Containers, serverless, auto scaling and load balancing
- Relational, NoSQL and in-memory databases, and moving them
- VPCs, subnets, traffic controls and private connectivity
- Object storage and the S3 storage classes — you are here
- Block, file and hybrid storage, lifecycle rules and backup
- Machine learning and analytics services
- Messaging, integration and business applications
- Developer tools, end-user computing, front end and IoT