Learn/Architecture
Architecture · 13 min read · August 2026
S3, EBS, and EFS: Storage That Matches the Workload
Object vs block vs file storage as AWS documents it — durability, attachment model, and the cost traps in student labs.
Source. Amazon S3 User Guide · Amazon EBS User Guide · Amazon EFS User Guide
Abstract & theoretical context
S3 is object storage: buckets, keys, 11 nines durability design, accessed over HTTPS APIs. EBS is a network disk attached to one AZ and typically one EC2 instance (unless io2 Block Express / multi-attach patterns). EFS is a regional NFS file system many instances can mount. Mixing them up is the most common architecture error in first-year labs — putting a website on EBS snapshots, or expecting S3 to behave like a POSIX disk. This reproduction follows AWS's own storage taxonomy so you pick the API that matches the access pattern.
Models, formulas & variables
1. S3 object address
s3://bucket/key and arn:aws:s3:::bucket/key
- — Bucket names are global. Keys are a prefix string, not nested folders on disk.
- — Block Public Access should stay on unless the lab is explicitly a public static site.
2. EBS vs instance
volume.lifecycle ⊥ instance.lifecycle (until you DeleteOnTermination)
- — Snapshots land in S3 behind the scenes. Restore is a new volume, not a live undo.
- — gp3 is the default general-purpose SSD family AWS currently recommends for most labs.
Reference implementation
Copy into a sandbox account. Pin Region ap-south-1 unless the lab says otherwise.
put-object.sh
AWS CLI · S3
aws s3 mb s3://tcet-sbg-lab-$RANDOM --region ap-south-1
aws s3api put-public-access-block --bucket tcet-sbg-lab-demo \
--public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
echo "hello builders" > hello.txt
aws s3 cp hello.txt s3://tcet-sbg-lab-demo/labs/hello.txt
aws s3api put-bucket-encryption --bucket tcet-sbg-lab-demo \
--server-side-encryption-configuration '{"Rules":[{"ApplyServerSideEncryptionByDefault":{"SSEAlgorithm":"AES256"}}]}'Lab procedure
- 01Create a bucket in ap-south-1 with Block Public Access on and default encryption.
- 02Upload one object, generate a pre-signed URL, and confirm it expires.
- 03Attach a gp3 volume to a stopped test instance, start it, and mount the device — then detach.
- 04Read the EFS docs enough to know it is regional and priced by storage + throughput mode.
- 05Delete the bucket (empty it first) so the lab does not leak objects for months.
Key insights
- S3 is not a dropbox folder. Concurrent writers need object-key design, not file locks.
- EBS is AZ-scoped. You cannot attach a Mumbai volume to a N. Virginia instance.
- Intelligent-Tiering and lifecycle rules are how classwork dumps stop billing forever.
Account & lab requirements
s3:* scoped to a lab bucket prefix. Empty buckets before account cleanup.
More in Architecture
Compute Paths: EC2, Lambda, and When to Choose Which
Always-on virtual machines versus event-driven functions, using the same decision language AWS uses in its compute docs.
AWS Well-Architected Framework: Six Pillars on a Whiteboard
Operational excellence, security, reliability, performance, cost, and sustainability — the official review questions turned into a campus lab checklist.