Understanding Amazon EC2 and Computing Services
Amazon Elastic Compute Cloud (EC2) provides resizable virtual machines called instances. EC2 powers most AWS applications and frequently appears on certification exams.
Instance Types and Families
EC2 instances are classified by instance families. Each family optimizes for different workload patterns:
- General Purpose (t3, m5): Balanced compute, memory, and networking
- Compute Optimized (c5): High-performance processors for batch processing
- Memory Optimized (r5): Large datasets and in-memory caches
- Storage Optimized (i3): High sequential read/write access to data sets
- Accelerated Computing (p3): GPU instances for machine learning
Key EC2 Concepts
Understand instance states including running, stopped, and terminated. Security groups act as virtual firewalls controlling inbound and outbound traffic. Key pairs enable secure SSH access to instances.
Amazon Machine Images (AMIs) serve as templates for launching instances. The EC2 Instance Metadata Service provides information about running instances. Application Load Balancers distribute traffic across multiple instances for high availability.
Pricing and Optimization
Focus on three primary pricing models. On-Demand instances charge hourly without long-term commitments. Reserved Instances offer discounts for committing to one or three year terms. Spot Instances provide significant savings for flexible, interruptible workloads.
Remember that t-type instances are burstable, suitable for variable CPU usage. M-type instances provide consistent performance for steady workloads. Flashcards help you memorize instance family characteristics and recall when to use each pricing model.
Mastering Amazon S3 and Object Storage
Amazon Simple Storage Service (S3) is the most widely used AWS service for storing and retrieving data. S3 stores objects in buckets with unique global names. Objects are identified by keys within those buckets.
Storage Classes and Lifecycle Policies
Choose the right storage class for your access patterns and cost requirements:
- Standard: Frequent access, high availability
- Standard-IA: Infrequent access with retrieval fees
- Glacier: Long-term archival with slow retrieval
- Intelligent-Tiering: Automatic cost optimization across tiers
S3 lifecycle policies automatically transition objects between storage classes. Policies can also delete objects after specified periods to reduce storage costs.
Security and Access Control
S3 versioning enables tracking object history and recovering previous versions. Server-side encryption protects data at rest using SSE-S3, SSE-KMS, or SSE-C options. Control public access through bucket policies, IAM roles, and Access Control Lists. The Block Public Access feature provides additional protection by preventing accidental public exposure.
Advanced Features
S3 event notifications trigger Lambda functions or SNS topics when objects are uploaded. Multipart upload enables efficient uploading of large objects. CloudFront distribution accelerates content delivery globally. CORS configuration allows cross-origin requests from web browsers.
For exams, memorize that bucket names are globally unique. Objects use the URL format (bucket-name.s3.amazonaws.com/key). S3 provides 11 nines of durability. Flashcards excel at helping you remember storage class comparisons and when to use each option.
AWS Lambda and Serverless Computing
AWS Lambda enables running code without provisioning servers. Lambda is ideal for event-driven applications and microservices that respond to various triggers.
Execution Model and Runtimes
Lambda functions execute in response to events from 90+ AWS services including S3, API Gateway, DynamoDB, SNS, and SQS. Functions run in containers that initialize when first invoked. Subsequent requests may reuse the same container in a warm state, avoiding initialization overhead. The handler function is your entry point, specified as (file-name.function-name).
Lambda supports multiple runtimes including Python, Node.js, Java, Go, and .NET. Choose runtimes based on your team's expertise and performance requirements.
Pricing and Resource Limits
Pricing is based on invocations and execution time rounded to 100ms increments. The free tier includes 1 million invocations monthly. Functions have a 512MB temporary storage at /tmp and a 15-minute timeout limit for maximum execution duration.
Configuration and Integration
Environment variables store configuration without modifying code. IAM execution roles grant permissions to access other AWS services. Lambda layers package libraries and custom code that multiple functions can reuse, reducing duplication.
Concurrency limits control simultaneous function executions. Reserved concurrency ensures capacity for critical functions. X-Ray integrates for distributed tracing and performance analysis. CloudWatch Logs automatically capture all function output and errors.
Advanced Capabilities
VPC integration allows Lambda functions to access private resources like RDS databases, though it adds initialization latency. For exam preparation, understand that Lambda scales automatically, cold starts add latency on initial invocation, and functions require proper IAM permissions. Flashcards help distinguish between trigger types and remember permission requirements for common use cases.
Database Services: RDS and DynamoDB
AWS provides two primary database services for different use cases. Amazon RDS handles traditional SQL databases while Amazon DynamoDB provides NoSQL document and key-value storage.
RDS Features and Management
RDS supports MySQL, PostgreSQL, Oracle, SQL Server, and MariaDB engines. AWS automatically handles patching, backups, and multi-AZ failover, reducing operational overhead.
Read replicas enhance performance by distributing read traffic across multiple instances. Multi-AZ deployments provide synchronous replication to a standby instance. If the primary instance fails, automatic failover activates the standby with minimal downtime.
RDS backup retention stores automated backups for up to 35 days, enabling point-in-time recovery to any moment within that window. Database parameter groups customize engine settings. DB option groups enable additional features like encryption.
Enhanced monitoring provides OS-level metrics beyond standard CloudWatch metrics. Performance Insights identifies query bottlenecks and resource contention.
DynamoDB Architecture
DynamoDB is a fully managed NoSQL service offering single-digit millisecond latency at any scale. Tables consist of items with attributes. Every table requires a partition key for basic queries. An optional sort key enables additional querying flexibility and range queries.
DynamoDB supports two billing modes. Provisioned capacity pre-allocates throughput units with predictable costs. On-demand automatically scales based on traffic, suitable for unpredictable workloads.
DynamoDB Advanced Features
Global Secondary Indexes enable querying by different keys than the partition key. Local Secondary Indexes must be created at table creation time. DynamoDB Streams capture item modifications for processing by Lambda functions.
TTL automatically deletes expired items based on timestamps, reducing storage costs. DynamoDB Accelerator (DAX) provides in-memory caching for microsecond-level read performance.
Flashcards are invaluable for remembering RDS engine characteristics, backup strategies, DynamoDB partition key design best practices, and when to choose each service.
API Gateway, CloudWatch, and Developer Tools
Amazon API Gateway creates REST and WebSocket APIs that integrate with Lambda, EC2, and other backend services. API Gateway handles request processing before forwarding to your application.
API Gateway Features
API Gateway provides authentication through API keys and Lambda authorizers. It enables request/response transformation to modify data between clients and backends. Rate limiting through throttling policies prevents abuse. CORS configuration allows browser-based requests from different domains.
Stages like dev, test, and prod enable multiple deployments with different configurations. Stage variables route requests to different backend endpoints. API Gateway integrates directly with Lambda for serverless APIs where requests automatically trigger function execution.
Models and request validators enforce schema validation before backend invocation, catching errors early.
CloudWatch Monitoring
CloudWatch monitors AWS resources and applications through metrics, logs, and alarms. Custom metrics from applications enable application-specific monitoring. Detailed monitoring increases metric frequency from 5 minutes to 1 minute for faster alerting.
CloudWatch Logs Insights enables querying logs with SQL-like syntax. This powerful tool helps troubleshoot issues across thousands of log entries. Alarms trigger actions on SNS topics when metrics exceed thresholds, enabling notifications and auto-scaling triggers.
CloudWatch Events schedule tasks using cron expressions. Events can also trigger Lambda functions based on AWS service events.
Security and Infrastructure
AWS Systems Manager Parameter Store securely stores configuration values and passwords. It includes encryption and version tracking. Secrets Manager manages database credentials and API keys with automatic rotation capabilities.
IAM defines granular permissions through policies. Policies contain statements that allow or deny specific actions on resources. Understanding the least privilege principle is critical for security. Grant only the permissions needed for each task.
X-Ray provides distributed tracing across microservices. It shows service maps and identifies performance bottlenecks. AWS CloudFormation enables Infrastructure as Code by defining AWS resources in templates.
For exam success, understand how these services integrate. Master API Gateway throttling behaviors, CloudWatch metric math, and IAM policy conditions. Flashcards help memorize API Gateway stages, CloudWatch alarm actions, and IAM policy syntax patterns.
