Chapter 13: Amazon EBS (Elastic Block Store)
Practice Questions and Lab Exercises
Come on, now practice! Take a snapshot before every lab, and at the end delete the volumes you used.
चला, आता प्रॅक्टिस! प्रत्येक लॅबच्या आधी स्नॅपशॉट घ्या, आणि शेवटी वापरलेले व्हॉल्यूम्स डिलीट करा.
चलो, अब प्रैक्टिस! हर लैब से पहले स्नैपशॉट लो, और आख़िर में इस्तेमाल किए वॉल्यूम्स डिलीट करो.
- What is EBS? How is it different from instance store?
- Compare gp3, gp2, io2, st1 and sc1 volume types with one use case each. Which cannot be used as boot volumes?
- What is an incremental snapshot? How do you move an EBS volume to another AZ?
- Why do device names differ between the console (
/dev/sdf) and Linux (/dev/nvme1n1)? - List the commands to grow an XFS root volume and an ext4 root volume after modifying the size.
- Why do we use UUID and
nofailin/etc/fstab? How do you test fstab before rebooting? - Lab: Increase your root volume from 8 GiB to 12 GiB on a running Amazon Linux 2023 instance and verify with
df -hT. - Lab: Repeat on Ubuntu (ext4) using
resize2fs. - Lab: Create a 5 GiB gp3 volume, attach, format as XFS, mount at
/datawith a permanent fstab entry, reboot and verify. - Lab: Take a snapshot of the data volume, create a new volume from it in another AZ, attach it to another instance and read your file (do not run
mkfs!). - Lab: Detach the volume safely and delete it.
Got it? EBS is EC2's disk – in one AZ, protected by snapshots, and in fstab with UUID and nofail. Now let's move on to EC2 operations – Elastic IP, AMI and scaling.
समजलं का? EBS म्हणजे EC2 ची डिस्क – एका AZ मध्ये, स्नॅपशॉटने सुरक्षित, आणि fstab मध्ये UUID आणि nofail. आता पुढे जाऊया EC2 ऑपरेशन्सकडे – Elastic IP, AMI आणि स्केलिंग.
समझ आया? EBS मतलब EC2 की डिस्क – एक AZ में, स्नैपशॉट से सुरक्षित, और fstab में UUID और nofail. अब आगे चलते हैं EC2 ऑपरेशन्स की तरफ़ – Elastic IP, AMI और स्केलिंग.
Quick Revision
- EBS = persistent network block storage in one AZ; snapshots are regional & incremental.
- Types: gp3 (default SSD, 3,000 IOPS baseline), gp2 (older, size-based IOPS), io2 (provisioned high IOPS), st1 (throughput HDD), sc1 (cold HDD).
- Nitro:
/dev/sdfappears as/dev/nvme1n1; use UUIDs. - Grow: console Modify volume →
growpart /dev/nvme0n1 1→xfs_growfs -d /(XFS) orresize2fs /dev/nvme0n1p1(ext4) →df -hT. - Add: create in same AZ → attach →
lsblk→file -s→mkfs→mkdir→mount→ fstabUUID=... /data xfs defaults,nofail 0 2→mount -a. - Detach: stop users →
umount→ remove fstab line → detach in console.
Extended teaching notes
Why this lesson matters
Cloud security is mostly IAM, network exposure, logging and secure defaults. The shared responsibility model means the provider patches the metal; you patch what you configure.
- No public databases or public admin panels.
- Roles / OIDC instead of long-lived access keys.
- CloudTrail / Activity Logs / Audit Logs on and retained.
- S3/Blob/GCS: Block Public Access; encrypt; least privilege.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.