EC2 Instance Types and Families
EC2 instances come in different families, each optimized for specific use cases. Each family name indicates its purpose and capabilities.
General-Purpose Instances
General-purpose instances (M5, M6i, M7i families) balance compute, memory, and networking resources. Use them for web applications, small to medium databases, and backend services. These suit most workloads when you lack specific performance requirements.
Specialized Instance Families
Compute-optimized instances (C5, C6i, C7i families) deliver high-performance processors. Choose them for batch processing, media transcoding, and high-performance web servers.
Memory-optimized instances (R5, R6i, X1 families) provide large memory capacity. Use them for in-memory databases, data analytics, and real-time big data processing.
Storage-optimized instances (I3, D2, H1 families) offer high sequential read/write access. Select them for NoSQL databases and data warehousing.
Accelerated computing instances (P3, G4, F1 families) include GPUs or FPGAs. They power machine learning, graphics rendering, and hardware acceleration.
Understanding Instance Naming
The naming convention matters for the exam. The letter indicates the family, the number indicates the generation, and the letter suffix indicates size within that generation. Newer generations offer better performance and efficiency than older ones.
Create flashcards pairing use cases with appropriate instance families. Build another set comparing performance metrics and costs across families.
EC2 Pricing Models and Cost Optimization
AWS offers multiple pricing models that significantly impact your architecture decisions and costs. Choosing the right model matters on the exam and in real deployments.
Core Pricing Models
-
On-Demand instances charge per hour with no commitment. Use them for unpredictable workloads and development or testing environments.
-
Reserved Instances provide up to 72% discount in exchange for one or three-year commitments. Perfect for steady-state production workloads.
-
Savings Plans offer flexibility across instance families and regions with similar discounts to Reserved Instances.
-
Spot Instances let you bid on unused capacity at up to 90% discount. They can be interrupted with two minutes notice, so use them for fault-tolerant workloads like batch processing.
-
Dedicated Hosts provide physical servers for compliance requirements or licensed software.
-
Dedicated Instances run on hardware dedicated to a single customer.
Cost Optimization Strategy
A common exam scenario involves optimizing costs for baseline load plus spiky traffic. Use Reserved Instances for the baseline and On-Demand or Spot for peaks. Calculate break-even points between models for your specific usage patterns.
Flashcards work exceptionally well for pricing because you must quickly recall discount percentages, commitment periods, and appropriate scenarios. Create cards comparing when to use each model.
EC2 Storage and Block Storage Integration
EC2 instances require storage solutions, which primarily involve Amazon EBS (Elastic Block Store) volumes. EBS provides persistent block-level storage volumes that attach to running instances and survive instance termination.
EBS Volume Types and Specifications
General Purpose (gp3, gp2) volumes suit balanced performance needs. GP3 volumes support up to 16,000 IOPS and 1,000 MB/s throughput.
Provisioned IOPS (io2, io1) volumes deliver high-performance for databases. IO2 volumes reach 64,000 IOPS for consistent low-latency performance.
Throughput Optimized (st1) volumes handle sequential workloads efficiently. Cold HDD (sc1) volumes provide cost-effective storage for infrequent access.
Instance Store Volumes
Instance store provides temporary block-level storage directly attached to the physical host. It offers high performance but loses all data when the instance stops. Use it only for temporary caches, scratch data, and parallel processing where data loss is acceptable.
Backup and Disaster Recovery
EBS snapshots create point-in-time backups and can be copied across regions for disaster recovery. For durable data requiring persistence, always use EBS.
Flashcards excel at distinguishing between volume types and memorizing IOPS/throughput specifications. Create comparison cards that help you quickly identify which volume type suits different scenarios.
EC2 Networking, Security Groups, and VPC Integration
EC2 instances operate within Virtual Private Cloud (VPC) environments and require proper networking configuration. Networking controls what can communicate with your instances.
Security Groups Fundamentals
Security Groups act as stateful firewalls controlling inbound and outbound traffic at the instance level. Define allowed protocols (TCP, UDP, ICMP), ports, and source/destination IP addresses or other Security Groups. Security Groups are stateful, meaning return traffic for allowed inbound connections flows out automatically without explicit outbound rules.
Network Interfaces and IP Addressing
Elastic Network Interfaces (ENIs) attach to instances and provide network connectivity. Each ENI has a primary private IPv4 address and optionally public IPv4 addresses or Elastic IPs. Elastic IPs are static public IPv4 addresses that you can reassign between instances for high availability.
Network ACLs and Subnet-Level Control
Network ACLs operate at the subnet level and are stateless, requiring explicit allow rules for both inbound and outbound traffic. The exam frequently tests understanding of when to use Security Groups versus NACLs and how they work together.
Public and Private Subnets
Public subnets contain instances reachable from the internet. Private subnets require NAT instances or NAT gateways for outbound internet access. This architecture controls what resources the internet can access.
Flashcards help you memorize Security Group rule syntax, recall stateful versus stateless differences, and practice designing network architectures. Create scenario-based cards testing what inbound/outbound rules specific applications need.
EC2 Performance, Monitoring, and Best Practices
Optimizing EC2 performance involves understanding instance characteristics, monitoring capabilities, and architectural best practices. Performance design prevents bottlenecks and wasted spending.
CloudWatch Monitoring
CloudWatch provides metrics like CPU utilization, network throughput, and disk I/O for monitoring instance health. Detailed monitoring increases metric frequency from 5-minute to 1-minute intervals for faster issue detection. Undersized instances create bottlenecks while oversized instances waste money.
Placement Groups for Low-Latency Communication
Cluster Placement Groups pack instances into a low-latency group within a single Availability Zone. Partition Placement Groups spread instances across logical partitions for distributed systems like Hadoop and Kafka. Spread Placement Groups distribute instances across underlying hardware within an AZ.
Fleet Management and Automation
AWS Systems Manager helps manage EC2 fleets through automation, patching, and configuration. EC2 Image Builder streamlines creation of custom AMIs with consistent configurations. Auto Scaling groups provide dynamic capacity that adjusts to demand.
High Availability and Disaster Recovery
High Availability architectures use multiple EC2 instances across Availability Zones with load balancing. Disaster recovery strategies involve regularly backed-up AMIs and cross-region replication. Design resilient, performant, and cost-effective architectures.
Flashcards help you remember specific CloudWatch metrics, recall performance optimization techniques, and match architectural requirements to EC2 configurations. Create cards linking common performance problems to their solutions.
