10.5
Storage Classes and Lifecycle Rules
Durability vs availability, every class from Standard to Deep Archive, Intelligent-Tiering, Express One Zone, lifecycle design and Storage Class Analysis.
30 min Reading + animations
Tip: tap or hover any dotted-underlined term to see what it means.
By the end of this lesson you will be able to
- Explain the difference between durability and availability, and say what an AZ failure does to Standard, One Zone-IA and Express One Zone data.
- Describe every S3 storage class (Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant Retrieval, Glacier Flexible Retrieval, Glacier Deep Archive, Express One Zone) with its price, retrieval fee, minimum storage duration and minimum billable size.
- Restore an archived object, choose between Expedited, Standard and Bulk retrieval, and know when provisioned capacity is needed.
- Calculate the real cost of a class, including retrieval fees, minimum-duration charges and the 128 KB minimum.
- Design lifecycle rules: transitions, expirations, noncurrent versions, delete markers and incomplete multipart uploads, filtered by prefix, tags or size, and use Storage Class Analysis to choose the days.
#Why S3 has more than one storage class
#The same bytes, different needs
In lesson 10.1 every object you uploaded landed in S3 Standard, the default. Standard is fast, highly available and has no extra fees, and for data you use every day it is the right choice. But look at what a real company stores:
- a hospital keeps every scan for 7 years because the law says so, yet a scan is looked at a few times in its first month and almost never after a year;
- a news site keeps 15 years of photos; this week’s photos are opened millions of times, while a photo from 2012 is opened only when an editor writes a “ten years ago” story;
- a bank keeps web server logs for a year for the regulator and reads them only during an incident or an audit;
- a machine learning team reads the same training files thousands of times a day and wants every millisecond back.
Paying Standard prices for all of that is wasteful, and Standard is not even the fastest option for the ML team. So S3 offers storage classes: the same API, the same bucket, the same 11 nines of durability, but a different trade between four things:
- Storage price per GB per month.
- Access cost: a fee per GB you read (the retrieval fee) and the price of each request.
- Access time: milliseconds, or minutes to hours after a restore.
- Commitments: a minimum storage duration and a minimum billable object size.
The cheaper the storage, the more you pay to read it and the longer you must keep it. Choosing a class is choosing where on that curve each set of data belongs, and lifecycle rules move it along the curve as it ages.
Every object has its own storage class. You set it when you upload (--storage-class in the CLI, the x-amz-storage-class header in the API), change it later by copying the object, or let a lifecycle rule or Intelligent-Tiering change it for you. One bucket can hold objects of every class side by side.
#Durability and availability
These two words sound alike and the exam uses that.
#Durability: will the data still exist?
Durability measures the chance of losing an object. Every S3 storage class is designed for 99.999999999% (11 nines) durability of objects over a year. AWS’s own illustration: if you store 10,000,000 objects, you can expect to lose one object every 10,000 years on average. The arithmetic: a loss rate of 10⁻¹¹ per object per year × 10⁷ objects = 10⁻⁴ objects a year, one every 10,000 years.
S3 gets there by storing each object redundantly on many devices, checking stored data with checksums all the time, and rebuilding any copy that goes bad. For every class except the single-AZ ones, those devices are spread over at least three Availability Zones (lesson 1.2), so the object survives the loss of an entire AZ.
#Availability: can I reach it right now?
Availability measures how much of the time requests succeed. During a brief internal problem a request can fail with a 500 or 503 error even though the object is perfectly safe; the AWS SDKs retry automatically. Availability differs by class:
| Class | Designed availability | Downtime it allows per year | SLA (refund below this) |
|---|---|---|---|
| Standard | 99.99% | about 53 minutes | 99.9% |
| Intelligent-Tiering, Standard-IA, Glacier Instant Retrieval | 99.9% | about 8.8 hours | 99% |
| One Zone-IA | 99.5% | about 44 hours | 99% |
| Express One Zone | 99.95% | about 4.4 hours | |
| Glacier Flexible Retrieval, Deep Archive | 99.99% (after restore) | 99.9% |
The design figure is what the system is built for; the SLA is the lower number AWS guarantees with service credits.
#The single-AZ classes
One Zone-IA and Express One Zone keep their data in one AZ only. Inside that AZ the data is still stored redundantly on several devices, so the design durability is still 11 nines against device failures. But if the AZ itself is destroyed by a fire, flood or earthquake, the data is lost, and while the AZ is down the data is unavailable. That is why AWS recommends One Zone-IA only for data you can re-create: thumbnails, transcoded copies, a second backup copy, or replicas made by Cross-Region Replication (lesson 10.4).
Durability is about losing data, availability is about reaching it
An S3 Standard object is stored on many devices across at least three Availability Zones. A One Zone-IA object lives in one AZ only. Watch what each survives.
Scenario
Why S3 can promise 11 nines: redundancy across AZs plus constant repair.
A hospital app uploads a scan with PUT. It does not choose a location inside the Region; S3 decides where the bytes go.
#The storage classes one by one
#S3 Standard: the default for data in use
- 99.99% availability, data in at least three AZs, millisecond access, high throughput.
- No retrieval fee, no minimum duration, no minimum size. You pay storage ($0.023 per GB-month for the first 50 TB in us-east-1, less above that) and requests ($0.005 per 1,000 PUTs, $0.0004 per 1,000 GETs).
- Use it for anything read often: websites and mobile app content, content distribution, big data analytics that scans data every day, gaming assets, the first weeks of almost any data.
The slides add that Standard is designed to sustain the loss of two facilities at the same time, which is the old way of saying “redundant across AZs”.
#Standard-IA and One Zone-IA: infrequent, but instant when needed
“IA” means infrequent access: data you read rarely, perhaps once a month or less, but that must come back in milliseconds when you do.
- Storage: Standard-IA $0.0125 per GB-month (about 46% below Standard), One Zone-IA $0.01 (about 57% below).
- Retrieval fee: $0.01 for every GB you read, plus higher request prices ($0.01 per 1,000 PUTs, $0.001 per 1,000 GETs).
- Minimum storage duration: 30 days. Delete, overwrite or transition an object after 10 days and you still pay for 30.
- Minimum billable size: 128 KB. A 20 KB object is billed as 128 KB.
- Availability: Standard-IA 99.9% across at least three AZs; One Zone-IA 99.5% in a single AZ.
Use Standard-IA for backups, disaster recovery copies and older data that is the only copy of something (a bank’s monthly statements after the first month). Use One Zone-IA for data that is cheap to rebuild or that exists elsewhere: thumbnails, a secondary copy of on-premises backups, replicas.
When is IA cheaper? Per GB, Standard-IA saves $0.0105 a month and costs $0.01 per read. So it wins as long as each GB is read less than about once a month on average. Read the data every day and IA costs several times more than Standard.
#Glacier Instant Retrieval: archive price, millisecond access
S3 Glacier Instant Retrieval (launched in 2021) is for data that is rarely read, about once a quarter, but must open instantly when it is: medical images after the first year, old news photos, user-generated content that nobody looks at.
- Storage $0.004 per GB-month, about 83% below Standard.
- Retrieval $0.03 per GB, three times Standard-IA, and $0.01 per 1,000 GETs.
- Minimum duration 90 days, minimum billable size 128 KB.
- Millisecond access with a normal GET, 99.9% availability, at least three AZs. No restore step.
#Glacier Flexible Retrieval: archive with a restore step
S3 Glacier Flexible Retrieval (formerly called simply S3 Glacier; its API name is still GLACIER) is for archives read about once a year, where waiting minutes or hours is fine: old backups, finished projects, media masters.
- Storage $0.0036 per GB-month.
- Minimum duration 90 days. No minimum object size, but every archived object carries 40 KB of overhead: 8 KB of name and metadata billed at the Standard rate (so you can still list archived objects in real time) and 32 KB of index billed at the Glacier rate.
- Not readable directly: you must restore a temporary copy first, with one of three retrieval options:
| Option | Typical time | Price (us-east-1) |
|---|---|---|
| Expedited | 1–5 minutes (objects under 250 MB) | $0.03 per GB + $10 per 1,000 requests |
| Standard (default) | 3–5 hours | $0.01 per GB + $0.05 per 1,000 requests |
| Bulk | 5–12 hours | free |
#Glacier Deep Archive: the cheapest storage in AWS
S3 Glacier Deep Archive is for data you keep for years and may never read: compliance records, the hospital’s 7-year scans after the first year, a bank’s 10-year transaction archives, replacements for tape libraries.
- Storage $0.00099 per GB-month: about $1 per TB per month, 23 times cheaper than Standard.
- Minimum duration 180 days, plus the same 40 KB overhead per object.
- Restore options: Standard within 12 hours ($0.02 per GB) and Bulk within 48 hours ($0.0025 per GB). There is no Expedited option.
#Restoring an archived object
Objects in Glacier Flexible Retrieval and Deep Archive (and in the optional archive tiers of Intelligent-Tiering) are still S3 objects: you see them in listings with their key, size and metadata. But a GET returns 403 with the error code InvalidObjectState. To read one:
- Send a restore request (
aws s3api restore-object), choosing the retrieval tier and how many days to keep the temporary copy. - S3 accepts it with 202 and starts the job. Only one restore per object runs at a time. If the bucket has event notifications for
s3:ObjectRestore:Postands3:ObjectRestore:Completed(lesson 10.7), you are told when it starts and when it is done, instead of polling withhead-object. - When the copy is ready, GETs work until the copy expires. During that time you pay for both the archived object and the temporary copy, which is billed at the Standard rate.
- The object’s storage class does not change. To bring it back for good, copy the object onto itself with a new storage class while the restored copy exists.
Two extras for big or urgent restores:
- Provisioned capacity. On-demand Expedited retrievals are accepted only when capacity is free; at busy times they fail with 503. Each unit of provisioned capacity, bought for a monthly fee by the account that makes the requests, guarantees at least 3 Expedited retrievals every 5 minutes and up to 300 MB/s. Buy it when urgent restores are part of your plan; buy Glacier Instant Retrieval instead if you need instant access often.
- S3 Batch Operations (lessons 10.7 and 10.12) starts restores for millions of objects from one job, uses the full restore request rate of the account (1,000 per second), and its Standard restores from Glacier Flexible Retrieval typically start within minutes. Restoring very large data sets runs at up to 1–2 PB per day per account.
Getting an object back from Glacier
Objects in Glacier Flexible Retrieval and Deep Archive cannot be read directly. You ask for a temporary copy first, choose how fast, and wait.
Scenario
The default tier: about 3–5 hours from Glacier Flexible Retrieval.
An auditor asks for a 2019 report. The app tries a normal GET, as it would for any object.
#Intelligent-Tiering: when you do not know the access pattern
S3 Intelligent-Tiering is one storage class that contains several access tiers. S3 watches when each object was last read and moves it between tiers automatically:
| Tier | When an object goes there | Storage price | Access |
|---|---|---|---|
| Frequent Access | on upload, and whenever it is read again | $0.023 (like Standard) | ms |
| Infrequent Access | after 30 days without access | $0.0125 (like Standard-IA) | ms |
| Archive Instant Access | after 90 days without access | $0.004 (like Glacier Instant Retrieval) | ms |
| Archive Access (optional) | after 90–730 days, as you configure | $0.0036 (like Glacier Flexible) | restore: minutes to 12 hours |
| Deep Archive Access (optional) | after 180–730 days, as you configure | $0.00099 (like Deep Archive) | restore: within 12–48 hours |
What makes it different:
- No retrieval fees and no charge for moving between tiers. A read in any automatic tier sends the object straight back to Frequent Access. Standard and Bulk restores from the optional archive tiers are free too.
- A monitoring and automation fee of $0.0025 per 1,000 objects per month.
- No minimum storage duration and no minimum billable size. But objects smaller than 128 KB are not monitored and never leave the Frequent Access tier (they are not charged the monitoring fee either).
- The two archive tiers are off by default. You turn them on with an Intelligent-Tiering configuration on the bucket (optionally filtered by prefix or tag), and only for data your application can wait for, because reading from them needs a restore.
- Designed availability 99.9%, data in at least three AZs.
The notes say Intelligent-Tiering “uses AI to learn user patterns”. It is simpler and more predictable than that: a fixed rule based on days since the last access. Nothing is predicted.
When to use it: whenever the access pattern is unknown, unpredictable or changing: a data lake used by many teams, user uploads, a new product with no history. When not to: data whose pattern you know (logs that are never read after 30 days are cheaper with a lifecycle rule, which has no monitoring fee), and buckets full of tiny objects.
Intelligent-Tiering moves each object for you
One storage class, five access tiers. S3 watches when each object was last read and moves it, with no retrieval fees.
Scenario
The three automatic tiers: all readable in milliseconds.
A Dhaka e-commerce shop uploads product photos. Nobody knows which products will sell, so it picks Intelligent-Tiering. Every new object starts in the Frequent Access tier, priced like Standard.
#S3 Express One Zone: the fastest class
S3 Express One Zone (launched November 2023) is built for the lowest latency S3 can give: consistent single-digit millisecond access, up to 10 times faster than Standard, and hundreds of thousands of requests per second.
How it is different from every other class:
- It lives in a different kind of bucket, a directory bucket, which you create in one AZ that you choose. Its name ends with the AZ ID, for example
ml-train--use1-az4--x-s3. The storage class is alwaysEXPRESS_ONEZONE. - You put your compute (EC2, ECS, EKS, SageMaker training jobs) in the same AZ, so data does not cross AZs. Authentication uses short-lived sessions (
CreateSession) to keep per-request overhead low. - 99.95% availability and 11 nines design durability, but within one AZ: an AZ disaster loses the data, as with One Zone-IA.
- Pricing turns upside down: storage is the most expensive at $0.11 per GB-month (about 5 times Standard), while requests are much cheaper ($0.00113 per 1,000 PUTs, $0.00003 per 1,000 GETs), plus small per-GB upload ($0.0032) and retrieval ($0.0006) charges. It pays off for hot data read very often, not for keeping data.
- No minimum duration or size. Lifecycle rules on directory buckets can expire objects and clean up multipart uploads, but cannot transition them to other classes.
Use cases: machine learning training that reads the same files over and over, interactive analytics with Athena or Spark, financial modelling, media processing, HPC scratch space. The common pattern is to keep the master data in Standard or Intelligent-Tiering and copy the working set into Express One Zone for the job.
#Comparing the classes
#The full table
| Standard | Intelligent-Tiering | Standard-IA | One Zone-IA | Glacier Instant | Glacier Flexible | Deep Archive | Express One Zone | |
|---|---|---|---|---|---|---|---|---|
| Durability (design) | 11 nines | 11 nines | 11 nines | 11 nines (1 AZ) | 11 nines | 11 nines | 11 nines | 11 nines (1 AZ) |
| Availability (design) | 99.99% | 99.9% | 99.9% | 99.5% | 99.9% | 99.99% | 99.99% | 99.95% |
| AZs | ≥ 3 | ≥ 3 | ≥ 3 | 1 | ≥ 3 | ≥ 3 | ≥ 3 | 1 (you choose) |
| Minimum duration | none | none | 30 days | 30 days | 90 days | 90 days | 180 days | none |
| Minimum billable size | none | none (< 128 KB not tiered) | 128 KB | 128 KB | 128 KB | none (+40 KB overhead) | none (+40 KB overhead) | none |
| Retrieval fee | none | none | per GB | per GB | per GB | per GB (Bulk free) | per GB | small per GB |
| First byte | ms | ms (archive tiers: restore) | ms | ms | ms | minutes to hours | hours | single-digit ms |
#Prices in us-east-1 (October 2026)
| Storage per GB-month | Retrieval per GB | PUT per 1,000 | GET per 1,000 | |
|---|---|---|---|---|
| Standard | $0.023 | none | $0.005 | $0.0004 |
| Intelligent-Tiering | $0.023 → $0.0125 → $0.004 (→ $0.0036 → $0.00099) + $0.0025 per 1,000 objects | none | $0.005 | $0.0004 |
| Standard-IA | $0.0125 | $0.01 | $0.01 | $0.001 |
| One Zone-IA | $0.01 | $0.01 | $0.01 | $0.001 |
| Glacier Instant Retrieval | $0.004 | $0.03 | $0.02 | $0.01 |
| Glacier Flexible Retrieval | $0.0036 | Expedited $0.03, Standard $0.01, Bulk free | $0.03 | $0.0004 |
| Glacier Deep Archive | $0.00099 | Standard $0.02, Bulk $0.0025 | $0.05 | $0.0004 |
| Express One Zone | $0.11 | $0.0006 (+ $0.0032 per GB uploaded) | $0.00113 | $0.00003 |
Prices change and differ by Region; the exam never asks for exact numbers, but it does expect the order: storage gets cheaper from Standard down to Deep Archive, while retrieval cost, retrieval time and minimum duration go up.
#Minimum durations and minimum sizes in practice
These two rules quietly change the answer for short-lived or small data:
- Minimum duration. Store 1 TB in Glacier Instant Retrieval and delete it after 10 days: you pay for 90 days, $0.004 × 1,024 × 3 ≈ $12.29, more than 10 days of Standard ($0.023 × 1,024 × 10/30 ≈ $7.85). Leaving early by deletion, overwrite or transition all trigger the pro-rated charge.
- Minimum size. 10 million objects of 16 KB are 153 GB of real data. In Standard: 153 × $0.023 ≈ $3.51 a month. In Standard-IA each is billed as 128 KB, so 1,221 GB × $0.0125 ≈ $15.26 a month: four times more than Standard.
- Archive overhead. The same 10 million objects in Deep Archive add 10 million × 40 KB ≈ 381 GB of overhead, 76 GB of it at the Standard rate. Pack small files into bigger archives (tar or zip) before archiving.
- Request costs. Moving those 10 million objects into Deep Archive costs 10,000 × $0.05 = $500 in transition requests, while the data itself costs about 15 cents a month to store there. With small objects, request fees dominate.
What will this data cost in each class?
Set how much data you have, how big each object is, how much of it is read each month and how long you keep it. The bars show the total bill for the whole period, us-east-1 prices (October 2026).
- S3 Standard· ms$288 ($23.99 a month)
- Intelligent-Tiering· ms$125 ($10.39 a month)
- Standard-IA· ms$165 ($13.79 a month)
- One Zone-IA· msruled out: one AZ only$135 ($11.23 a month)
- Glacier Instant Retrieval· ms$75.07 ($6.26 a month)
- Glacier Flexible Retrieval· 3–5 h restore$80.66 ($6.72 a month)
- ★ Glacier Deep Archive· ≤ 12 h restore$69.78 ($5.82 a month)
- Express One Zone· single-digit msruled out: one AZ only$1,356 ($113 a month)
Simplified model: reads spread evenly; Glacier Flexible and Deep Archive reads use Standard restores with the copy kept one day; Intelligent-Tiering keeps the share read each month hot and lets the rest cool (Infrequent after month 1, Archive Instant after month 3). Restore request fees and data transfer out are left out.
Glacier Deep Archive is cheapest here: $69.78 for the whole period, against $288 in Standard.One Zone classes are ruled out because this is the only copy: an AZ loss would destroy it.
Self-checkQuestion
A lifecycle rule will move 20 million log objects of 50 KB each from S3 Standard to Glacier Deep Archive. Lifecycle transitions into Deep Archive cost $0.05 per 1,000 requests. What is the one-time transition cost, and what should the architect notice?
#Moving objects between classes
#Ways to change an object’s class
- At upload:
aws s3 cp report.pdf s3://bucket/ --storage-class STANDARD_IA. A general purpose bucket accepts uploads straight into any class, including the Glacier classes, with no waiting period. - By copying the object onto itself (or to another key) with a new storage class:
aws s3api copy-object … --storage-class GLACIER_IR. This is the only way to move up to a warmer class, and for archived objects it needs a restore first. - By a lifecycle rule: the usual way, automatic and per prefix, tag or size.
- By Intelligent-Tiering: inside that one class, between its tiers.
- By S3 Batch Operations: a copy with a new class for millions of existing objects in one job (lesson 10.12).
#The waterfall
Lifecycle rules move objects only downhill, from warmer to colder classes, in this order: Standard → Standard-IA → Intelligent-Tiering → One Zone-IA → Glacier Instant Retrieval → Glacier Flexible Retrieval → Glacier Deep Archive. Not every downhill pair is allowed: One Zone-IA can drop only to Glacier Flexible Retrieval or Deep Archive, and objects in Intelligent-Tiering can move only to classes that suit their current tier. Nothing moves out of Deep Archive by lifecycle. Express One Zone is not on the waterfall at all.
The lifecycle waterfall
Lifecycle rules only move objects downhill, toward colder and cheaper classes. Pick the class an object is in now.
Object is now in
- ● S3 Standardno minimum
current class
- ✓ Standard-IA30-day minimum
lifecycle rule
- ✓ Intelligent-Tieringno minimum
lifecycle rule
- ✓ One Zone-IA30-day minimum
lifecycle rule
- ✓ Glacier Instant Retrieval90-day minimum
lifecycle rule
- ✓ Glacier Flexible Retrieval90-day minimum
lifecycle rule
- ✓ Glacier Deep Archive180-day minimum
lifecycle rule
Not on the waterfall: S3 Express One Zone lives in directory buckets, where lifecycle rules can expire objects (and abort multipart uploads) but cannot transition them. To move that data, copy it to a general purpose bucket.
From S3 Standard a rule can move objects to any green class below. Everything above is “uphill”: lifecycle cannot do it, but a copy with a new storage class can.
#Rules that changed recently
- The 30-day wait before Standard-IA and One Zone-IA is gone (July 2026). For years a lifecycle rule could not move objects to Standard-IA or One Zone-IA until they were at least 30 days old, and the notes and many exam questions still say so. Since 16 July 2026 a rule can transition objects to these classes from day 0. What did not change is the 30-day minimum storage duration once an object is in IA. For the exam, if a question is built on “objects must be stored 30 days in Standard before moving to Standard-IA”, answer with that rule in mind; in real designs you can now skip the wait.
- Small objects stay where they are (September 2024). Lifecycle rules by default do not transition objects smaller than 128 KB to any class, because each transition is a paid request that would cost more than the saving. To move them anyway, add an object size filter (
ObjectSizeGreaterThanorObjectSizeLessThan). You can still upload a small object directly into Standard-IA; it is simply billed as 128 KB.
#Lifecycle rules
#What a rule is made of
A bucket has one lifecycle configuration with up to 1,000 rules. Each rule has:
- an ID and a status (Enabled or Disabled);
- a filter: the whole bucket, a prefix (
logs/), one or more tags (Department=Finance), an object size range, or a combination (combined with AND); - one or more actions, each with a number of days (or a date).
The actions:
| Action | What it does |
|---|---|
Transition | Moves the current version to another class after N days (e.g. Standard-IA at 30, Glacier at 180) |
Expiration | Expires the current version after N days. Non-versioned bucket: the object is deleted. Versioned bucket: a delete marker is added and the object becomes noncurrent |
NoncurrentVersionTransition | Moves old versions N days after they became noncurrent, optionally keeping the newest few (NewerNoncurrentVersions, 1–100) where they are |
NoncurrentVersionExpiration | Permanently deletes old versions N days after they became noncurrent, optionally keeping the newest few |
ExpiredObjectDeleteMarker | Removes delete markers that no longer have any versions behind them |
AbortIncompleteMultipartUpload | Stops multipart uploads not completed N days after they started and deletes their parts |
The two clean-up actions (expired delete markers and incomplete multipart uploads) cannot be used in a rule filtered by tags.
#How S3 counts days and bills
- Days count from the object’s creation (its last-modified time), or from when a version became noncurrent, and are rounded up to the next midnight UTC. An object created on 15 January at 10:30 with a 3-day rule is due on 19 January at 00:00 UTC.
- Rules run asynchronously: an object may move or disappear a little after its due date. Billing follows the rule, not the delay: a transition to Glacier is billed at the new rate from the due date, and you are not billed for storage of an object after its expiration date.
- When rules overlap, permanent deletion wins over transition, transition wins over creating a delete marker, and between Glacier Flexible Retrieval and an IA class S3 picks the cheaper Glacier Flexible Retrieval.
- A single rule cannot move objects out of a class before its minimum duration. Glacier Instant Retrieval at day 4 and Deep Archive at day 20 in one rule is rejected; the second transition must be at day 94 or later. Two separate rules are accepted, but you then pay the remaining minimum-duration charge.
- Each transition is a paid request (from $0.01 per 1,000 into Standard-IA to $0.05 per 1,000 into Deep Archive), and expiration is free.
#Incomplete multipart uploads
A large upload is sent in parts (multipart upload, lesson 10.12). If the client crashes and never completes or aborts the upload, the parts it sent stay stored and billed, yet they are not an object and do not appear in a normal listing. A bucket that receives big uploads can quietly accumulate terabytes of them. The fix is an AbortIncompleteMultipartUpload rule, typically after 7 days. An expiration rule does not remove them.
#Versioned buckets
With versioning on (lesson 10.4), “deleting” an object only adds a delete marker, and every overwrite keeps the old version. Without noncurrent-version rules the bucket keeps every version forever and the bill only grows. A typical versioned rule:
- transition noncurrent versions to a cheaper class after N days;
- expire noncurrent versions after M days (keeping, say, the last 3);
- remove expired object delete markers.
Lifecycle rules on a timeline
Each bar is one object, version or upload. Press play to watch the rule act on it day by day (the axis is not to scale).
Scenario
Rule on prefix logs/: Standard-IA at 30 days, Glacier Flexible Retrieval at 90, expire at 365.
Rule: logs/ → IA @30 → Glacier Flexible @90 → expire @365
A bank’s web servers write a log file every day into Standard. In the first weeks engineers read logs often to debug incidents, so Standard is right.
#Two scenarios from the exam
Profile photos and thumbnails
An application on EC2 creates thumbnails of profile photos uploaded to S3. Thumbnails can be re-created and only need to be kept for 60 days. Source photos must be immediately retrievable for 60 days; after that users can wait up to 6 hours.
Design: keep the source photos in Standard with a lifecycle rule that transitions them to Glacier Flexible Retrieval after 60 days (Standard restores take 3–5 hours, inside the 6-hour limit). Keep the thumbnails in One Zone-IA (re-creatable, so one AZ is fine) with a rule that expires them after 60 days. Use two prefixes (
source/andthumbs/) or tags so each rule hits only its objects.Recover deleted objects: instantly for 30 days, within 48 hours for a year
A company rule says deleted S3 objects must be recoverable immediately for 30 days, and within 48 hours for up to 365 days.
Design: enable versioning, so a delete only adds a delete marker and the object becomes a noncurrent version. Keep noncurrent versions where they can be read at once for 30 days (Standard, or Standard-IA), then transition noncurrent versions to Glacier Deep Archive after 30 days (Bulk restore within 48 hours), and expire noncurrent versions after 365 days.
#Storage Class Analysis
How many days should the rule wait before moving data to Standard-IA? Guessing is risky: too early and retrieval fees eat the saving, too late and you overpay for storage. S3 Analytics, Storage Class Analysis, measures it for you.
- You enable it on a bucket, or on a group of objects by prefix and/or tags (up to 1,000 filters per bucket).
- It looks at objects in Standard larger than 128 KB, groups them by age (0–14 days, 15–29, 30–44 … 730+), and measures how much of each age group is retrieved.
- It shows the first data after 24 to 48 hours, but needs to observe 30 days or more before it gives a recommendation, and keeps updating it daily.
- It recommends only for Standard → Standard-IA. It says nothing about One Zone-IA, the Glacier classes or Intelligent-Tiering.
- You can export a daily CSV report to a bucket (in the same Region, any account) and open it in a spreadsheet or Amazon Quick.
- It costs $0.10 per million objects monitored per month.
Use it as the first step in writing or tuning lifecycle rules. To see storage and activity across a whole organisation, use S3 Storage Lens instead (lesson 10.7).
#What goes wrong
- IA for hot data. A team moves a dashboard’s data to Standard-IA “to save money”; the dashboard reads it all every hour and the retrieval fees triple the bill. IA pays off only below about one read per GB per month.
- Glacier for data you need now. Logs archived to Glacier Flexible Retrieval are needed during a 2 a.m. outage: a GET returns 403 and the restore takes hours. Archive only what can wait, or use Glacier Instant Retrieval.
- Early deletion. A test pipeline writes temporary files to Glacier Instant Retrieval and deletes them daily; every file is billed for 90 days.
- Millions of tiny files. Small objects lose the IA and Glacier discounts (128 KB minimum, 40 KB overhead, per-request transition fees) and never move in Intelligent-Tiering.
- The forgotten multipart parts. Terabytes of invisible parts from failed uploads; the fix is one lifecycle rule.
- Versions forever. Versioning on, no noncurrent rules: every overwrite is kept and billed. In the Storage Lens dashboard noncurrent bytes grow month after month.
- A rule that expires the wrong prefix. Lifecycle expiration is permanent in a non-versioned bucket. Test a rule on a narrow prefix, and keep versioning plus noncurrent expiration as a safety net for important data.
- One Zone for the only copy. A team stores original customer documents in One Zone-IA to save 20%; an AZ incident makes them unavailable, and a disaster would lose them.
#Storage classes in system design
- Start with the access pattern, not the price list. For each data set, write down how often it is read in its first week, month and year, how fast it must come back, whether it can be re-created and how long the law requires it. The class and the lifecycle rule follow from those answers.
- Hospital scans kept 7 years: Standard for 30 days (doctors read them), Standard-IA until day 365 (follow-up visits), then Glacier Deep Archive (legal retention, restore within 12 hours is fine), expiring after 2,555 days. If the hospital cannot predict follow-ups, Intelligent-Tiering with the Deep Archive Access tier turned on does the same automatically. Add Object Lock if records must be tamper-proof (lesson 10.9).
- A news site’s photo archive: Standard → Standard-IA → Glacier Instant Retrieval, because even a 10-year-old photo must load instantly when a story links it. Thumbnails in One Zone-IA, since they can be regenerated.
- Backups and disaster recovery: the primary backup in Standard-IA, older backups in Glacier Flexible or Deep Archive. A cross-Region replica (lesson 10.4) can go straight into a cheaper class, often One Zone-IA or Glacier, because the source is the main copy. Chapter 23 covers backup strategies and RPO/RTO.
- Data lakes and shared buckets: Intelligent-Tiering as the default storage class when many teams read unpredictably, with Athena (lesson 17.1) querying it in place.
- ML and analytics scratch space: Express One Zone in the same AZ as the compute, fed from Standard, expired by a lifecycle rule when the job is done.
- Every bucket: an
AbortIncompleteMultipartUploadrule, and noncurrent-version rules wherever versioning is on.
#Try it yourself
Upload with a chosen class and check it:
aws s3 cp scan-0001.dcm s3://hospital-scans-example/2026/ --storage-class STANDARD_IA
aws s3api head-object --bucket hospital-scans-example --key 2026/scan-0001.dcm \
--query StorageClass
A lifecycle configuration for a logs prefix, a versioned prefix and multipart clean-up, saved as lifecycle.json:
{
"Rules": [
{
"ID": "logs-tiering",
"Status": "Enabled",
"Filter": { "Prefix": "logs/" },
"Transitions": [
{ "Days": 30, "StorageClass": "STANDARD_IA" },
{ "Days": 90, "StorageClass": "GLACIER" }
],
"Expiration": { "Days": 365 }
},
{
"ID": "old-versions",
"Status": "Enabled",
"Filter": { "Prefix": "contracts/" },
"NoncurrentVersionTransitions": [
{ "NoncurrentDays": 30, "StorageClass": "DEEP_ARCHIVE" }
],
"NoncurrentVersionExpiration": { "NoncurrentDays": 365, "NewerNoncurrentVersions": 3 },
"Expiration": { "ExpiredObjectDeleteMarker": true }
},
{
"ID": "abort-mpu",
"Status": "Enabled",
"Filter": {},
"AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 }
}
]
}
aws s3api put-bucket-lifecycle-configuration --bucket hospital-scans-example \
--lifecycle-configuration file://lifecycle.json
aws s3api get-bucket-lifecycle-configuration --bucket hospital-scans-example
# Find forgotten multipart uploads
aws s3api list-multipart-uploads --bucket hospital-scans-example
Restore an archived object and watch its status:
aws s3api restore-object --bucket hospital-scans-example --key logs/2025-01-15.gz \
--restore-request '{"Days":2,"GlacierJobParameters":{"Tier":"Bulk"}}'
aws s3api head-object --bucket hospital-scans-example --key logs/2025-01-15.gz \
--query Restore # "ongoing-request=\"true\"" until the copy is ready
Turn on the archive tiers of Intelligent-Tiering, and Storage Class Analysis for a prefix:
aws s3api put-bucket-intelligent-tiering-configuration --bucket shop-media-example \
--id archive-old-invoices --intelligent-tiering-configuration '{
"Id": "archive-old-invoices", "Status": "Enabled",
"Filter": { "Prefix": "invoices/" },
"Tierings": [ { "Days": 180, "AccessTier": "ARCHIVE_ACCESS" },
{ "Days": 365, "AccessTier": "DEEP_ARCHIVE_ACCESS" } ] }'
aws s3api put-bucket-analytics-configuration --bucket shop-media-example \
--id photos-analysis --analytics-configuration '{
"Id": "photos-analysis", "Filter": { "Prefix": "photos/" },
"StorageClassAnalysis": { "DataExport": { "OutputSchemaVersion": "V_1",
"Destination": { "S3BucketDestination": { "Format": "CSV",
"Bucket": "arn:aws:s3:::analytics-reports-example", "Prefix": "sca/" } } } } }'
Create an Express One Zone directory bucket in one AZ:
aws s3api create-bucket --bucket ml-train--use1-az4--x-s3 --region us-east-1 \
--create-bucket-configuration \
'Location={Type=AvailabilityZone,Name=use1-az4},Bucket={DataRedundancy=SingleAvailabilityZone,Type=Directory}'
#Summary
Key takeaways
- Durability (will the data survive?) is 11 nines in every class; availability (can I reach it now?) varies: Standard 99.99%, IA classes and Glacier Instant 99.9%, One Zone-IA 99.5%, Express One Zone 99.95%.
- One Zone-IA and Express One Zone live in one AZ: same design durability, but lost if the AZ is destroyed. Only for re-creatable data.
- Standard: hot data, no extra fees. Standard-IA / One Zone-IA: monthly-or-rarer reads, ms access, retrieval fee, 30-day minimum, 128 KB minimum size.
- Glacier Instant Retrieval: quarterly reads, ms access, 90 days. Glacier Flexible Retrieval: restore first, Expedited 1–5 min, Standard 3–5 h, Bulk 5–12 h (free), 90 days. Deep Archive: cheapest (~$1/TB-month), Standard ≤12 h, Bulk ≤48 h, no Expedited, 180 days.
- A restore makes a temporary copy (billed at Standard) for N days; the class does not change. Provisioned capacity guarantees Expedited retrievals.
- Intelligent-Tiering: unknown or changing patterns, no retrieval fees, small monitoring fee, tiers at 30 and 90 days plus optional archive tiers; objects under 128 KB stay in Frequent. Rule-based, not AI.
- Express One Zone: directory bucket in one AZ, single-digit ms, 10× faster, cheap requests but expensive storage; ML training and HPC.
- Lifecycle rules: transition, expiration, noncurrent versions, expired delete markers, abort incomplete multipart uploads; filter by prefix, tags, size; only downhill (the waterfall). Since July 2026 transitions to IA can start at day 0; by default objects under 128 KB are not transitioned.
- Storage Class Analysis: Standard → Standard-IA recommendations after 30+ days of observation, daily CSV export.
Answer on your own first, then read the explanation, even when you got it right.
Self-checkQuestion
What is the designed durability of S3 One Zone-IA?
Self-checkQuestion
A company stores 10,000,000 objects in S3 Standard. Based on the 11 nines durability design, how often can it expect to lose a single object, on average?
Self-checkQuestion
What is the designed availability of S3 Standard-IA?
Self-checkQuestion
A media company launches a new streaming catalogue. Some titles will be popular and others ignored, and nobody can predict which. Storage cost must be optimised automatically, without retrieval fees. Which storage class fits?
Self-checkQuestion
A company must keep tax records for 10 years. They are almost never read, and when they are, a wait of up to 48 hours is acceptable. What is the cheapest storage class?
Self-checkQuestion
Which two statements about retrieval options for S3 Glacier Flexible Retrieval are correct?
Choose 2
Self-checkQuestion
Medical images older than one year are viewed about once a quarter, and when a doctor opens one it must load in milliseconds. Which class gives the lowest cost?
Self-checkQuestion
An application generates thumbnails from original images stored in S3 Standard. Thumbnails are read rarely and can be regenerated in seconds. Which class is the most cost-effective for the thumbnails?
Self-checkQuestion
A team uploads 1 TB (1,024 GB) to S3 Standard-IA and deletes it after 10 days. Standard-IA costs $0.0125 per GB-month. What storage charge do they pay?
Self-checkQuestion
A bucket holds 10 million objects of 16 KB each (about 153 GB). Standard costs $0.023 and Standard-IA $0.0125 per GB-month. What happens to the monthly storage bill if all objects move to Standard-IA?
Self-checkQuestion
Regulators require that archived records be retrievable within 6 hours, at the lowest possible storage cost. Records are requested a few times a year. Which option meets the requirement?
Self-checkQuestion
An application calls GET on an object that a lifecycle rule moved to S3 Glacier Flexible Retrieval. What happens?
Self-checkQuestion
An object in Glacier Deep Archive is restored for 5 days. Which statement is true during those 5 days?
Self-checkQuestion
During a busy period, a company’s Expedited restore requests from Glacier Flexible Retrieval sometimes fail with an error saying expedited retrievals are not available. The business needs urgent restores to succeed. What should the architect do?
Self-checkQuestion
An object in S3 Intelligent-Tiering has not been read for 30 consecutive days. What does S3 do?
Self-checkQuestion
Which two statements about S3 Intelligent-Tiering are true?
Choose 2
Self-checkQuestion
A company trains machine learning models on EC2 instances in a single Availability Zone. Training jobs read the same data set thousands of times and need consistent single-digit millisecond latency from S3. The master copy of the data stays elsewhere. What should the architect use?
Self-checkQuestion
Which two statements about S3 Express One Zone are true?
Choose 2
Self-checkQuestion
A bucket receives large video uploads from mobile apps. The bill keeps growing although the number of objects is stable, and list-multipart-uploads shows thousands of uploads started weeks ago. What is the most cost-effective fix?
Self-checkQuestion
Thumbnails can be re-created and are needed for 60 days only. Source images must be retrievable immediately for 60 days, and after that users can wait up to 6 hours. What is the most cost-effective design?
Self-checkQuestion
Company policy: deleted S3 objects must be recoverable immediately for 30 days, and within 48 hours for up to one year. Which design meets this at the lowest cost?
Self-checkQuestion
Which lifecycle transition is NOT supported?
Self-checkQuestion
A compliance team needs an object that sits in Glacier Deep Archive to live permanently in S3 Standard again. How is this done?
Self-checkQuestion
A team wants to know after how many days objects in S3 Standard are read rarely enough to move them to Standard-IA. Which feature helps, and what are its limits?
Self-checkQuestion
Which two filters can a lifecycle rule use to select objects?
Choose 2
Self-checkQuestion
In a versioning-enabled bucket, a lifecycle Expiration action of 90 days reaches the current version of report.pdf. What happens?
Self-checkQuestion
A new lifecycle rule should move all objects under logs/ to Glacier Flexible Retrieval after 90 days. Weeks later the large logs have moved, but thousands of 40 KB log files are still in S3 Standard. Why?
Self-checkQuestion
An engineer writes one lifecycle rule: transition to Glacier Instant Retrieval after 4 days, then to Glacier Deep Archive after 20 days. What happens?
Self-checkQuestion
An older practice exam says objects must stay at least 30 days in S3 Standard before a lifecycle rule can move them to Standard-IA. What is accurate as of late 2026?
Self-checkQuestion
A hospital must keep scans for 7 years. Doctors read a scan often in its first 30 days, occasionally until the end of its first year, and almost never after that; when they do, a 12-hour wait is acceptable. Which lifecycle design is the most cost-effective?
Self-checkQuestion
Which two statements about durability and availability in S3 are correct?
Choose 2