Amazon S3 (Simple Storage Service) stores objects (files) in buckets with virtually unlimited scale. S3 is the default choice for static assets, backups, logs, and data lake ingestion.
Key concepts
- Bucket — global unique name; lives in a chosen region
- Object — data + key (path-like name) + metadata
- Storage classes — Standard, Intelligent-Tiering, Glacier for archives
- Consistency — read-after-write consistency for new objects (awareness)
Common operations
# Replace my-unique-learning-bucket-12345 with YOUR globally unique name
aws s3 mb s3://my-unique-learning-bucket-12345 --region us-east-1
echo 'hello aws' > hello.txt
aws s3 cp hello.txt s3://my-unique-learning-bucket-12345/
aws s3 ls s3://my-unique-learning-bucket-12345/Practice: Create S3 buckets and VPC resources only in a sandbox account. Use unique bucket names globally; delete buckets and empty objects when finished.
Static website hosting
S3 can host static sites (HTML/CSS/JS). Pair with CloudFront for HTTPS and caching. Dynamic apps still need EC2, Beanstalk, or Lambda.
Free tier note
Free tier includes limited S3 storage and requests per month—monitor usage. Delete test buckets to avoid stray storage charges.
Important interview questions and answers
- Q: Bucket vs object?
A: Bucket is container; object is a file with a key inside the bucket. - Q: Why globally unique bucket names?
A: S3 DNS namespace is shared across all AWS customers.
Self-check
- What three parts define an S3 object?
- Why must bucket names be globally unique?
Pitfall: Bucket names are global—pick a long unique suffix like your initials plus random digits.
Interview prep
- Bucket vs object?
Bucket is container; object is file with key and metadata inside bucket.
- Global bucket name?
S3 DNS namespace is shared—all bucket names must be globally unique.