Skip to main content

MODULE 4 - Storage: Amazon EBS

Overview​

This module covers Amazon EBS (Elastic Block Store), the block storage service for EC2 instances. You will learn how to configure, optimize, and manage the storage of your virtual servers.

Summative Assessment

This module includes Assessment 1 (20%) covering EC2 and EBS.

Learning Objectives​

By the end of this module, you will be able to:

  • Understand the different types of EBS volumes
  • Explain attachment/detachment operations
  • Create and restore snapshots
  • Choose the storage type according to the use case
  • Optimize storage performance

Week Content​

1. Amazon EBS - Concepts​

┌─────────────────────────────────────────────────────────────┐
│ AMAZON EBS │
├─────────────────────────────────────────────────────────────┤
│ │
│ "Virtual hard drives for your EC2 instances" │
│ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ EC2 Instance │ │
│ │ │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ Volume │ │ Volume │ │ Volume │ │ │
│ │ │ Root │ │ Data 1 │ │ Data 2 │ │ │
│ │ │ (OS) │ │ (/data) │ │ (/logs) │ │ │
│ │ └──────────┘ └──────────┘ └──────────┘ │ │
│ │ │ │
│ └───────────────────────────────────────────────────┘ │
│ │
│ Features: │
│ • Persistent (data retained after stop) │
│ • Attachable/Detachable │
│ • Snapshots for backup │
│ • Encryption available │
│ • Different types based on performance │
│ │
└─────────────────────────────────────────────────────────────┘

2. EBS Volume Types​

TypeUse CaseMax IOPSMax ThroughputPrice
gp3General purpose16,0001,000 MB/s$0.08/GB
gp2General purpose (legacy)16,000250 MB/s$0.10/GB
io1/io2High perf DB64,0001,000 MB/s$0.125/GB + IOPS
st1Big Data, logs500500 MB/s$0.045/GB
sc1Archive, cold250250 MB/s$0.025/GB

3. Snapshots​

┌─────────────────────────────────────────────────────────────┐
│ EBS SNAPSHOTS │
├─────────────────────────────────────────────────────────────┤
│ │
│ EBS Volume ───► Snapshot ───► New Volume │
│ │ │
│ └───► Custom AMI │
│ │
│ Features: │
│ • Stored in S3 (managed by AWS) │
│ • Incremental (only changes) │
│ • Can be copied between regions │
│ • Basis for creating AMIs │
│ │
│ Best practices: │
│ ✅ Snapshot before major changes │
│ ✅ Automate with AWS Backup │
│ ✅ Regularly test restoration │
│ │
└─────────────────────────────────────────────────────────────┘

4. EBS Lifecycle​

Create ──► Attach ──► Use ──► Snapshot ──► Detach ──► Delete
│
└──► Modify (size, type)

Simulated Lab: EBS with LocalStack​

LocalStack partially supports EBS. Here are the simulated commands:

# Create a volume (simulation)
awslocal ec2 create-volume \
--availability-zone us-east-1a \
--size 100 \
--volume-type gp3

# List volumes
awslocal ec2 describe-volumes

# Create a snapshot
awslocal ec2 create-snapshot \
--volume-id vol-xxxxxxxx \
--description "Backup before update"

Assessment 1 (20%)​

Format​

  • Theoretical exam (60%)
  • Case analysis (40%)

Covered Content​

  • EC2 Concepts (Weeks 2-3)
  • Instance types and choice
  • Security Groups
  • EBS Storage
  • Architecture and best practices

Sample Questions​

  1. What instance type for an application with variable load?
  2. How to secure SSH access to an instance?
  3. What type of EBS volume for a database?
  4. Explain the concept of incremental snapshot.

Deliverables​

Evidence + Explanation + Success Criteria​

Document including:

  • Architecture diagram with storage
  • Justified volume type choices
  • Backup plan with snapshots
  • Storage cost estimation
  1. EBS Concepts - Fundamentals
  2. Snapshots - Backup and restoration
  3. Validation Quiz - 30 questions to validate your knowledge
  4. Lab: Storage - Practical exercise

Next week: MODULE 5 - VPC Fundamentals