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
| Type | Use Case | Max IOPS | Max Throughput | Price |
|---|---|---|---|---|
| gp3 | General purpose | 16,000 | 1,000 MB/s | $0.08/GB |
| gp2 | General purpose (legacy) | 16,000 | 250 MB/s | $0.10/GB |
| io1/io2 | High perf DB | 64,000 | 1,000 MB/s | $0.125/GB + IOPS |
| st1 | Big Data, logs | 500 | 500 MB/s | $0.045/GB |
| sc1 | Archive, cold | 250 | 250 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
- What instance type for an application with variable load?
- How to secure SSH access to an instance?
- What type of EBS volume for a database?
- 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
Navigation
- EBS Concepts - Fundamentals
- Snapshots - Backup and restoration
- Validation Quiz - 30 questions to validate your knowledge
- Lab: Storage - Practical exercise
Next week: MODULE 5 - VPC Fundamentals