EC2 Fundamentals

Core Concepts and Getting Started

Instance Types

General Purpose (T3, M5)

Balanced compute, memory, and networking

Compute Optimized (C5)

High-performance processors

Memory Optimized (R5, X1)

Fast performance for memory-intensive workloads

Storage Optimized (I3, D2)

High sequential read/write access

Security Groups

Virtual Firewall

Control inbound and outbound traffic

Stateful Rules

Return traffic automatically allowed

Default Deny

All inbound traffic blocked by default

Multiple Groups

Can attach multiple security groups

Storage Options

EBS (Elastic Block Store)

Network-attached storage that persists independently

  • • gp3, gp2 (General Purpose SSD)
  • • io2, io1 (Provisioned IOPS SSD)
  • • st1 (Throughput Optimized HDD)
  • • sc1 (Cold HDD)

Instance Store

Temporary storage physically attached to host

  • • Very high IOPS performance
  • • Data lost when instance stops
  • • Good for temporary data/cache
  • • No additional cost

User Data & Bootstrapping

#!/bin/bash
# Update system packages
yum update -y

# Install Apache web server
yum install -y httpd

# Start and enable Apache
systemctl start httpd
systemctl enable httpd

# Create a simple web page
echo "<h1>Hello from EC2!</h1>" > /var/www/html/index.html

User Data scripts run only once at instance launch with root privileges. Perfect for automated configuration and software installation.

Back to EC2 Topics Next: Instance Types Deep Dive
Back to Home Search Topics