EC2 (Elastic Compute Cloud)
Key Capabilities
- Rent Virtual Machines (EC2)
- Store Data on Virtual Drives (EBS)
- Distribute Load Across Machines (ELB)
- Scale Services Using Auto-Scaling Groups (ASG)
EC2 Sizing and Configuration Options
- Operating System (OS): Linux, Windows, or macOS
- Compute Power & Cores (CPU): Customizable to suit workload needs
- Memory (RAM): Configurable for different application requirements
- Storage:
- Network-attached (EBS, EFS)
- Local hardware (EC2 Instance Store)
- Network Card: Speed, Public IP address options
- Firewall Rules: Configured via Security Groups
- Bootstrap Scripts: Configure instances at launch using EC2 User Data
EC2 User Data
- Automates instance initialization through bootstrap scripts.
- Executed once during the first instance launch.
- Common tasks:
- Installing updates or software
- Downloading files
- Configuring the environment
- Runs with root user permissions.
EC2 Instance Types
Naming Convention Example
m5.2xlarge
- m: Instance class
- 5: Generation
- 2xlarge: Size within the instance class
General Purpose
- Balanced workloads (e.g., web servers, repositories)
- Equal distribution across compute, memory, and networking.
- Example:
t2.micro(commonly used in tutorials).
Compute Optimized
- High-performance processors for compute-intensive tasks:
- Batch processing
- Media transcoding
- Scientific modeling and ML
- Gaming servers
Memory Optimized
- Ideal for processing large data sets in memory:
- High-performance databases
- Real-time big data analytics
- In-memory databases
Storage Optimized
- Designed for storage-heavy tasks with high read/write access:
- Online transaction processing (OLTP)
- Data warehousing
- Distributed file systems