Amazon S3 storage classes and lifecycle rules: how to choose
Every Amazon S3 storage class compared: access time, minimum storage duration and size, archive retrieval options, and how lifecycle rules move and delete objects.
The storage classes at a glance
Every S3 storage class is designed for 99.999999999% (eleven nines) durability. What changes from class to class is how fast you can read an object, how many Availability Zones hold it, and the charges that come with cheaper storage: retrieval fees, minimum storage durations and minimum billable sizes.
| Storage class | Best for | Access | Availability Zones | Minimum duration | Minimum billable size |
|---|---|---|---|---|---|
| S3 Standard | Frequently read data | Milliseconds | 3 or more | None | None |
| S3 Intelligent-Tiering | Unknown or changing access patterns | Milliseconds (optional archive tiers need a restore) | 3 or more | None | None; objects under 128 KB stay in the Frequent Access tier |
| S3 Standard-IA | Long-lived data read about once a month | Milliseconds, with a retrieval fee | 3 or more | 30 days | 128 KB |
| S3 One Zone-IA | Infrequently read data you can re-create | Milliseconds, with a retrieval fee | 1 | 30 days | 128 KB |
| S3 Express One Zone | Latency-sensitive applications | Single-digit milliseconds | 1, which you choose | None | None |
| S3 Glacier Instant Retrieval | Archives read about once a quarter | Milliseconds, with a retrieval fee | 3 or more | 90 days | 128 KB |
| S3 Glacier Flexible Retrieval | Archives read about once a year | Restore first: minutes to hours | 3 or more | 90 days | None; about 40 KB of metadata is added per object |
| S3 Glacier Deep Archive | Archives read less than once a year | Restore first: hours | 3 or more | 180 days | None; about 40 KB of metadata is added per object |
Designed availability ranges from 99.99% for S3 Standard to 99.5% for S3 One Zone-IA. The One Zone classes can't survive the loss of their Availability Zone, which is why they suit data you can re-create.
How to choose a class
- Read often, or needed fast every time? S3 Standard. If a scenario stresses single-digit millisecond latency for a performance-critical application in one Availability Zone, S3 Express One Zone.
- Access pattern unknown or changing? S3 Intelligent-Tiering moves each object between tiers according to its actual use, with no retrieval fees, for a small monitoring fee per object.
- Read rarely, but needed in milliseconds when it is? S3 Standard-IA, or S3 Glacier Instant Retrieval for data read about once a quarter or less.
- Can the data be re-created, such as thumbnails or a second copy? S3 One Zone-IA costs less by storing it in one zone.
- Can it wait minutes to hours? S3 Glacier Flexible Retrieval. Hours, and kept for years for compliance? S3 Glacier Deep Archive, the lowest-cost class.
Getting data back from the archive classes
Objects in S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive can't be read until you restore them. A restore makes a temporary copy for the number of days you ask for, and the archived object stays where it is.
| Retrieval option | Glacier Flexible Retrieval | Glacier Deep Archive |
|---|---|---|
| Expedited | Typically 1–5 minutes for objects under 250 MB; larger objects at up to 300 MB per second | Not available |
| Standard | Typically 3–5 hours | Typically within 12 hours |
| Bulk | Typically 5–12 hours, with no retrieval fee | Typically within 48 hours |
S3 Glacier Instant Retrieval needs no restore. It reads in milliseconds, like S3 Standard-IA, for a higher retrieval fee and a 90-day minimum.
Charges that catch people out
- Minimum storage duration: delete, overwrite or transition an object before its 30, 90 or 180 days are up and you still pay for the rest of the period.
- Minimum billable size: an object under 128 KB in S3 Standard-IA, S3 One Zone-IA or S3 Glacier Instant Retrieval is billed as 128 KB, so small objects can cost more there than in S3 Standard.
- Retrieval fees per GB in the infrequent-access and Glacier classes, which can outweigh the storage saving for data that is read often.
- A request fee for every object that a lifecycle rule transitions, which adds up across millions of small objects.
- S3 Intelligent-Tiering's monitoring fee per object. Objects under 128 KB aren't monitored, and they stay in the Frequent Access tier.
Lifecycle rules: transitions and expirations
A lifecycle configuration applies rules to every object in a bucket, or to those matching a prefix, tags or a size range. A rule can transition objects to a cheaper class after a number of days, and expire (delete) them later. A typical rule for logs:
| Age | Action |
|---|---|
| Day 0 | Written to S3 Standard and read often |
| Day 30 | Transition to S3 Standard-IA |
| Day 90 | Transition to S3 Glacier Flexible Retrieval |
| Day 365 | Expire |
- Transitions only go from warmer to colder classes, in the order S3 supports. To move an object back to a warmer class, restore it if it's archived, then copy it.
- Since September 2024, lifecycle rules don't transition objects smaller than 128 KB by default, because the transition fee would outweigh the saving. An object size filter can change that.
- In a versioned bucket, separate actions handle old versions: transition or expire noncurrent versions after a number of days, keep a set number of recent versions, and remove expired delete markers.
- An action that aborts incomplete multipart uploads after a few days stops failed uploads from costing money.
- A single rule can't move objects out of a class before that class's minimum duration has passed. After a transition to S3 Glacier Instant Retrieval, for example, the same rule's next transition has to wait at least 90 days. Two separate rules can do it sooner, but you still pay the minimum-duration charge.
Exam cues
- Unpredictable or unknown access patterns: S3 Intelligent-Tiering.
- Rarely accessed but must be available immediately: S3 Standard-IA or S3 Glacier Instant Retrieval.
- Can be re-created, or a secondary copy: S3 One Zone-IA.
- Compliance archive, retrieval within hours, lowest cost: S3 Glacier Deep Archive. Occasionally needed within minutes: S3 Glacier Flexible Retrieval with expedited retrieval.
- Delete after a number of days, or old versions keep piling up: a lifecycle expiration or noncurrent-version rule.