S3: File Storage
S3 (Simple Storage Service) stores files, called objects, inside buckets. It is used for images, backups, videos and even whole static websites.
S3 is like an unlimited hard disk on the internet. You don't choose a size - you just upload files and pay for what you store and download. Websites use it for product images and videos, companies for backups and logs, and data teams as a "data lake" for analysis. It's one of the oldest and most used AWS services.
Each object is stored with a key (its name, which can look like a folder path such as products/2026/shoe.jpg) inside a bucket. S3 is designed to keep data extremely safe by storing copies across several data centres.
- Bucket names are unique across all of AWS, for example
myshop-product-images-2026. - S3 is built to be extremely durable: it keeps copies of your files in several places.
- New buckets block public access by default. Keep it that way unless you really need public files.
Storage classes
- S3 Standard: for files used often.
- S3 Standard-IA: cheaper, for files used now and then.
- S3 Glacier: very cheap archive storage, slower to get back.
Using S3 from the AWS CLI
Example
aws s3 mb s3://myshop-product-images-2026 # make a bucket
aws s3 cp shoe.jpg s3://myshop-product-images-2026/ # upload a file
aws s3 ls s3://myshop-product-images-2026/ # list files
aws s3 sync ./photos s3://myshop-product-images-2026/photosLifecycle rules can move old files to a cheaper class, or delete them, automatically.
Key points
- S3 stores files (objects) in buckets.
- Bucket names are globally unique; public access is blocked by default.
- Storage classes trade price for access speed.
- Lifecycle rules move or delete old files automatically.
📝 Test yourself
1. In S3, files are stored in...
2. Which storage class is cheapest for long-term archives?
3. Fill in the CLI command that copies a file to S3:
aws s3 file.txt s3://bucket/
