Lab 8 · S3, EBS & EFS¶
Performance · Est. time: 35–40 min ·
Cost: mostly Free Tier (5 GB S3, 30 GB EBS gp3, EFS has a small free allowance). EC2 for the mount
step is Free-Tier t3.micro. Tear down volumes/EFS after.
Goal. Touch all three storage shapes — object (S3), block (EBS), file (EFS) — and see why "many instances share the same files" means EFS, not EBS (Topic 8).
Part A — S3 object storage + lifecycle¶
- S3 → Create bucket
lab-storage-<random>. - Upload a file. Note the storage class (Standard) on the object.
- Management → Create lifecycle rule: transition objects to Standard-IA after 30 days, then Glacier after 90 — the cost pattern from Topic 11.
Point: S3 is accessed by API/key from anywhere — it's not a mounted disk.
Part B — EBS block storage (single instance)¶
- EC2 → Volumes → Create volume: gp3, 10 GiB, in the same AZ as an instance you'll attach it to.
- Actions → Attach volume → pick a running
t3.micro. - On the instance:
lsblkshows the new device; format + mount it (mkfs,mount). It's a raw disk for one instance.
Point: an EBS volume attaches to one instance in one AZ. Try to attach it to a second AZ's instance — you can't. That's the exam's EBS limitation.
Part C — EFS shared file system (many instances)¶
- EFS → Create file system
lab-efsin your VPC (mount targets in two AZs). - On two
t3.microinstances (different AZs), install the client and mount it: - Write a file from instance A (
echo hi | sudo tee /mnt/efs/shared.txt) and read it from instance B. Both see the same file, across AZs — concurrently.
Point: EFS is a shared NFS file system many Linux instances mount at once across AZs — the thing EBS can't do. (Windows/SMB → FSx for Windows.)
Teardown¶
- Unmount and delete the EFS file system (delete mount targets first if prompted).
- Detach and delete the EBS volume.
- Empty and delete the S3 bucket.
- Terminate the lab instances.
✅ What you should understand now¶
- S3 = object (API access, not a disk); EBS = block (one instance, one AZ); EFS = file (many instances mount concurrently across AZs).
- You can't share one EBS volume read/write across AZs — that's an EFS (or FSx) job.
- gp3 is the default general-purpose EBS volume; HDD types (st1/sc1) can't be boot volumes.
- S3 lifecycle rules move data to cheaper classes by age — the storage cost lever.
- EFS is Linux/NFS; for Windows/SMB shares use FSx for Windows.
Related: Learn — Storage Performance