Course Section Summary
This section covers Amazon EC2 (Elastic Compute Cloud), AWS's core compute service.
Study Files
| # | Topic | File | Priority |
|---|---|---|---|
| 1 | AWS Budget Setup | 01-AWS-Budget-Setup | π‘ Setup |
| 2 | EC2 Basics & Instance Launch | 02-EC2-Basics-Instance-Launch | π΄ High |
| 3 | EC2 Instance Types | 03-EC2-Instance-Types | π΄ High |
| 4 | Security Groups | 04-Security-Groups | π΄ High |
| 5 | SSH Access Methods | 05-SSH-Access-Methods | π‘ Medium |
| 6 | IAM Roles for EC2 | 06-IAM-Roles-for-EC2 | π΄ High |
| 7 | EC2 Purchasing Options | 07-EC2-Purchasing-Options | π΄ High |
| 8 | IPv4 Charges & Spot Deep Dive | 08-IPv4-Charges-Spot-Deep-Dive | π΄ High |
Key Exam Topics
Must Know for SAA-C03
EC2 Instance Types
- Naming convention (m5.2xlarge)
- General Purpose vs Compute vs Memory vs Storage Optimized
- t2.micro free tier
Security Groups
- Virtual firewall (allow rules only)
- Inbound/Outbound rules
- Timeout = Security Group issue
- Classic ports: 22 (SSH), 80 (HTTP), 443 (HTTPS), 3389 (RDP)
IAM Roles for EC2
- Never use
aws configureon EC2 - Attach IAM Roles instead
- Temporary credentials via Instance Metadata
- Never use
Purchasing Options
- On-Demand: No commitment, highest cost
- Reserved: 1-3 years, up to 72% off
- Savings Plans: Commit $/hour, flexible
- Spot: Up to 90% off, can be interrupted
- Dedicated Hosts: BYOL, compliance
Spot Instances
- 2-minute interruption warning
- One-time vs Persistent requests
- Cancel request BEFORE terminating instances
- Spot Fleets and allocation strategies
Quick Reference
Instance Type Prefixes
| Prefix | Type | Use Case |
|---|---|---|
| t, m | General Purpose | Web servers, dev |
| c | Compute Optimized | Batch, ML, gaming |
| r, x, z | Memory Optimized | Databases, caching |
| i, d, h | Storage Optimized | OLTP, warehousing |
Purchasing Options Comparison
| Option | Discount | Commitment | Interruption |
|---|---|---|---|
| On-Demand | 0% | None | No |
| Reserved | 72% | 1-3 years | No |
| Savings Plans | 72% | 1-3 years | No |
| Spot | 90% | None | Yes |
Classic Ports
SSH (Linux): 22
RDP (Windows): 3389
HTTP: 80
HTTPS: 443
Hands-On Checklist
- Set up AWS Budget (zero-spend + monthly)
- Launch EC2 instance with User Data
- Configure Security Group rules
- SSH into instance (any method)
- Attach IAM Role to EC2
- View Spot pricing history
- Understand instance lifecycle (stop/start/terminate)
Related Sections
- IAM Fundamentals - IAM basics before EC2
- EBS & EFS (next section) - Storage for EC2
- ELB & ASG (upcoming) - Load balancing and scaling
Check yourself
Quiz