Storing Objects with Amazon S3 and Choosing Storage Classes
This lesson explains how Amazon Simple Storage Service (Amazon S3), one of the most important services in the exam, provides scalable object storage for almost any kind of data, and how its storage classes and lifecycle policies balance price against access.
Learning outcomes
After completing this lesson, you will be able to:
- Describe how Amazon S3 stores data as objects in buckets.
- Identify the features that secure and protect S3 data, such as Block Public Access and versioning.
- Choose an S3 storage class from how often data is used and how quickly it must be retrieved.
- Explain how lifecycle policies move objects to cheaper classes and delete them.
How S3 works
Amazon S3 stores data as objects in buckets. The following list describes how the service works.
- Data is stored as objects (a file plus metadata) in buckets with globally unique names.
- Storage is virtually unlimited; one object can be up to 50 TB.
- Designed for 99.999999999% (eleven nines) durability by storing data across several Availability Zones.
Common uses: backup and restore, archiving, data lakes, app images and video, software distribution and static websites.
11nines
Designed durability (99.999999999%)
50TB
Maximum size of one object
Security and protection
Amazon S3 provides several features that secure and protect stored data. The following list describes them.
- Buckets are private unless you open them; S3 Block Public Access prevents accidental exposure.
- Bucket policies and IAM policies control access.
- New objects are encrypted by default.
- S3 Versioning keeps earlier versions, so you can recover from accidental deletion or overwrites.
S3 facts
Storage classes
S3 storage classes balance the price of storing data against how quickly and cheaply it can be retrieved. S3 Standard is for data used often. S3 Intelligent-Tiering is for data whose use is unknown or changes: it moves each object automatically to a cheaper tier when it is not being used. S3 Standard-IA (infrequent access) costs less to store but charges a fee to retrieve data, for data that is used rarely but must be available immediately. S3 One Zone-IA is cheaper again because it keeps data in one Availability Zone, so it suits data that can be re-created.
The Glacier classes are for archives. S3 Glacier Instant Retrieval still returns data in milliseconds. S3 Glacier Flexible Retrieval takes minutes to hours to retrieve data, and S3 Glacier Deep Archive is the cheapest class of all, for data kept for years, and takes hours to retrieve. The following table summarises the classes, from the most expensive to store to the least.
| Class | Use for | Retrieval |
|---|---|---|
| S3 Standard | Frequently accessed data | Milliseconds |
| S3 Intelligent-Tiering | Unknown or changing access patterns; moves objects between tiers automatically | Milliseconds for frequent and infrequent tiers |
| S3 Standard-IA | Infrequently accessed data needed quickly | Milliseconds, with a retrieval fee |
| S3 One Zone-IA | Infrequent, re-creatable data in one AZ; cheaper | Milliseconds, with a retrieval fee |
| S3 Glacier Instant Retrieval | Archives needing fast access | Milliseconds |
| S3 Glacier Flexible Retrieval | Archives | Minutes to hours |
| S3 Glacier Deep Archive | Long-term retention at the lowest cost | Within hours |
Choosing a storage class
Lifecycle policies
S3 Lifecycle policies automatically transition objects to cheaper classes as they age, for example to Standard-IA after 30 days and Glacier after 90, and expire (delete) them after a set time.
The following diagram shows the storage class at each age of an object.

An object's lifecycle
A lifecycle for invoices
A company stores scanned invoices in S3. Staff look at recent invoices often, rarely open ones older than a month, and must keep them for seven years for tax purposes. A lifecycle rule moves each invoice to cheaper storage as it ages:
| Age | Storage class | Why |
|---|---|---|
| 0-30 days | S3 Standard | Frequent access |
| 30-90 days | S3 Standard-IA | Occasional access, still needed quickly |
| 90 days-7 years | S3 Glacier Deep Archive | Lowest cost; retrieval within hours is acceptable for audits |
| After 7 years | Deleted (expiration) | No longer required |
The rule runs automatically, and versioning protects against accidental deletion in the meantime. If the company could not predict how often invoices are opened, S3 Intelligent-Tiering would move them between tiers automatically instead.
Which S3 storage class costs least for archives that are rarely accessed?
Show answer
S3 Glacier Deep Archive, whose retrievals take hours.
Exam Tips
Remember for the exam
- Unknown or changing access patterns suit S3 Intelligent-Tiering.
- The lowest-cost long-term archive is S3 Glacier Deep Archive.
- To move old data to cheaper classes automatically, use S3 Lifecycle policies.
- To recover from accidental deletion, use S3 Versioning.
- S3 is designed for eleven nines of durability.
- To host a static website, use S3, often with CloudFront.