Amazon S3 - Simple Storage Service
What is Amazon S3?
Amazon S3 (Simple Storage Service) is a fully managed object storage service with 99.999999999% durability. It can store any type of file up to 5 TB per object, with virtually unlimited total capacity.
Amazon S3 Video
W3schools.com collaborates with Amazon Web Services to deliver digital training content to our learners.
Amazon S3 Concepts
Buckets and Objects
A bucket is a container for objects with a globally unique name. An object consists of data (the file), metadata (information about it), and a key (unique identifier).
Image created by Amazon Web Services
Security
Everything in S3 is private by default. Grant access using:
- Bucket policies: Allow or deny actions on the bucket
- Identity-based policies: Control user, group, or role permissions
- Encryption: Protect data at rest and in transit
Lifecycle Management
Automate moving objects between storage classes with lifecycle rules:
- Transition actions: Move objects to cheaper storage classes over time
- Expiration actions: Automatically delete objects after a set period
Amazon S3 Storage Classes
S3 offers different storage classes based on how often you access your data and how fast you need it.
Frequently Accessed Data
| Storage Class | Best For |
|---|---|
| S3 Standard | Data accessed often. Stored in 3+ AZs. Highest availability, highest cost. |
| S3 Express One Zone | Fastest access (single-digit ms). 10x faster than Standard. 1 AZ. |
Infrequently Accessed Data
| Storage Class | Best For |
|---|---|
| S3 Standard-IA | Data accessed less often. 3+ AZs. Lower storage cost, higher retrieval cost. |
| S3 One Zone-IA | Same as Standard-IA but stored in 1 AZ. Cheaper. |
| S3 Intelligent-Tiering | Unknown access patterns. Automatically moves data between tiers. |
Archive Storage (Glacier)
| Storage Class | Best For |
|---|---|
| Glacier Instant Retrieval | Rarely accessed, but need instant access. 68% cheaper than Standard-IA. |
| Glacier Flexible Retrieval | Accessed 1-2x per year. Retrieval: minutes to hours. |
| Glacier Deep Archive | Long-term storage (7-10+ years). Lowest cost. 12-hour retrieval. |