πŸŽ“ AWS SAA-C03 STUDY GUIDE - THE 80/20 MASTER BLUEPRINT

πŸ“Š EXECUTIVE SUMMARY - Tα»•ng quan bΓ i thi

🎯 Exam Overview

  • Thời gian: 130 phΓΊt
  • CΓ’u hỏi: 65 cΓ’u
  • Điểm Δ‘αΊ‘t: 720/1000
  • Format: Multiple choice + Multiple response
  • GiΓ‘: $150 USD

πŸ“ˆ Score Distribution

  • Domain 1: Design Resilient Architectures (30%)
  • Domain 2: Design High-Performing Architectures (28%)
  • Domain 3: Design Secure Applications (24%)
  • Domain 4: Design Cost-Optimized Architectures (18%)

⚑ Top 6 Services (80% Score)

  • VPC: ~15% (Nền tαΊ£ng mαΊ‘ng)
  • EC2 + ELB + ASG: ~20% (Nền tαΊ£ng compute)
  • S3: ~15% (Nền tαΊ£ng lΖ°u trα»―)
  • IAM: ~10% (Nền tαΊ£ng bαΊ£o mαΊ­t)
  • RDS & Aurora: ~10% (Nền tαΊ£ng database)
  • Route 53: ~10% (Định tuyαΊΏn & HA)

πŸŽ“ Study Strategy

  • Week 1-2: TIER 1 (Foundations)
  • Week 3: TIER 2 (Building Blocks)
  • Week 4: TIER 3 + Integration Patterns
  • Week 5-6: Practice exams + Review
  • Target: 85%+ on practice tests

πŸ›οΈ The 6 Pillars of the Well-Architected Framework

+----------------------------------------------------------------------------+
| YOUR APPLICATION                                                           |
+----------------------------------------------------------------------------+
| +----------------------+ +----------------------+ +----------------------+ |
| | Operational          | | Security             | | Reliability          | |
| | Excellence           | |                      | |                      | |
| +----------------------+ +----------------------+ +----------------------+ |
| +----------------------+ +----------------------+ +----------------------+ |
| | Performance          | | Cost                 | | Sustainability       | |
| | Efficiency           | | Optimization         | |                      | |
| +----------------------+ +----------------------+ +----------------------+ |
+----------------------------------------------------------------------------+
                

?? STUDY TOOLKIT - LAST MILE ACCELERATORS

?? Analogy Vault (Picture It)

  • VPC: Private city; subnets are districts, route tables are the street map, security groups are building guards.
  • EC2 + ASG: Elastic workforce; EC2 instances are contractors on call, Auto Scaling is HR scheduling more staff on demand.
  • S3: Massive locker warehouse; storage classes are temperature zones that trade speed vs. cost.
  • IAM: Hotel security desk; policies are the guest list telling who can enter which room.
  • RDS & Aurora: Managed restaurant kitchen; AWS keeps ovens hot, replicates dishes, and swaps chefs when one fails.
  • Route 53: Global GPS dispatcher sending every request to the safest and fastest branch.

?? Mnemonics & Memory Tricks

  • Security: "SG = Stateful Guardians" at the instance, "NACL = Numbered ACL" at the subnet (rules evaluated by number).
  • EC2 Pricing: "ROSe Spot" = Reserved, On-Demand, Savings Plans, Spot.
  • S3 Encryption: "S3-K3" = SSE-S3, SSE-KMS, SSE-C (three server-side choices).
  • Route 53 Policies: "FLawLeSS" = Failover, Latency, Weighted, Location (Geo), Simple, Steering (Geoproximity).
  • Relational HA: "AZ = Availability, Replica = Reads" (Multi-AZ for uptime, Read Replica for scaling).

?? Integration Patterns You Must Name

  • Route 53 -> CloudFront -> ALB -> ASG -> RDS: Default highly available web stack for global users.
  • SNS fan-out -> SQS queues: One publish, many decoupled consumers (order processing, invoices, analytics).
  • API Gateway -> Lambda -> DynamoDB: Serverless microservice that scales to zero.
  • S3 Event -> Lambda -> Process file: Event-driven file processing (image thumbnails, data transformation).
  • Kinesis Firehose -> S3 -> Athena/QuickSight: Data lake ingestion and reporting with near real-time dashboards.
  • EventBridge -> Lambda -> Auto-remediation: Automated response to AWS events (e.g., stop untagged instances).
  • ALB -> ECS Fargate (multi-AZ): Containerized microservices with no infrastructure management.
  • CloudFormation StackSets: Deploy infrastructure to multiple accounts/regions from single template.
  • Secrets Manager + Lambda + RDS: Auto-rotating credentials for secure database access.
  • Direct Connect + VPN: Hybrid connectivity pattern for steady throughput plus encrypted failover.

?? Self-Check Questions Before Mock Exams

  1. Private subnet needs internet for patching: do you choose NAT Gateway, VPC Endpoint, or move to public?
  2. Traffic is HTTP with path-based rules and needs multi-AZ: ALB, NLB, or Gateway Load Balancer?
  3. Archive for 7 years with rare restores: which S3 storage class keeps cost lowest yet meets compliance?
  4. Lambda gets AccessDenied on S3: should you edit the bucket policy, IAM role, or VPC endpoint policy?
  5. Cross-region HA database: RDS Multi-AZ, Aurora Global, or DynamoDB global tables?
  6. Keywords "health check" and "failover" appear: which Route 53 policy fires?
  7. Lambda execution timeout issue (task > 15 min): Lambda isn't the answer - what do you use? (ECS Fargate)
  8. Auto-rotate database password: Secrets Manager or Parameter Store?
  9. Load streaming data to S3: Kinesis Data Streams or Firehose?
  10. Detect who deleted an S3 bucket: CloudWatch, CloudTrail, or Config?
  11. Serverless containers with no EC2 management: ECS on EC2, ECS Fargate, or EKS?
  12. Encrypt large 5GB file with audit trail: SSE-S3, SSE-KMS, or SSE-C?

?? Red-Flag Keywords & Instant Reactions

Keyword in scenario Go-to service Reason
"0.0.0.0/0" + "private subnet" NAT Gateway/Instance Private subnets need managed egress, not IGW.
"millisecond latency reads" + "NoSQL" DynamoDB + DAX DAX caches reads for microsecond responses.
"automatic key rotation" + "audit" AWS KMS CMK KMS rotates yearly and logs to CloudTrail.
"blue/green" + "database" Aurora clone or RDS Blue/Green Managed cutover without downtime.
"global DNS failover" Route 53 Failover policy Only policy that swaps to standby on health check.
"sudden spikes" + "control cost" Auto Scaling + Spot Scale out cheaply and terminate when demand drops.
"serverless" + "event-driven" Lambda Pay per execution, scales to zero.
"task takes 20+ minutes" ECS Fargate or Batch Lambda max 15 min timeout.
"rotate database password" Secrets Manager Built-in rotation for RDS, Redshift.
"who deleted this resource" CloudTrail API audit log (WHO did WHAT).
"is config compliant" AWS Config Configuration compliance rules.
"detect compromised EC2" GuardDuty ML-based threat detection.
"load streaming data to S3" Kinesis Firehose Simplest, fully managed.
"real-time < 1 second" Kinesis Data Streams Firehose has 60s+ buffer.
"serverless containers" ECS Fargate No EC2 management needed.
"infrastructure as code" CloudFormation Define infrastructure in templates.
"deploy app easily, no infra" Elastic Beanstalk PaaS for developers.
"monitor EC2 memory" CloudWatch Agent Memory NOT default metric.
"millisecond latency reads" + "NoSQL" DynamoDB + DAX DAX caches reads for microsecond responses. "automatic key rotation" + "audit" AWS KMS CMK KMS rotates yearly and logs to CloudTrail. "blue/green" + "database" Aurora clone or RDS Blue/Green Managed cutover without downtime. "global DNS failover" Route 53 Failover policy Only policy that swaps to standby on health check. "sudden spikes" + "control cost" Auto Scaling + Spot Scale out cheaply and terminate when demand drops.

?? Must-Memorize Numbers

Topic Number Why it matters
S3 durability 11 nines (99.999999999%) Argue for storing mission-critical backups.
S3 Glacier Deep Archive retrieval 12-48 hours Use only when cold archives are acceptable.
RDS automated backup retention 7-35 days Remember to schedule manual snapshots for longer.
DynamoDB capacity math 1 WCU = 1 KB/s write, 1 RCU = 4 KB/s strongly consistent read Needed for throughput sizing questions.
Route 53 health check interval 30 s default, 10 s fast Explains failover detection time.
CloudFront default TTL 24 hours Recognize caching behavior without custom headers.
ELB cross-zone On by default for ALB, optional (billable) for NLB Cost/architecture trade-off question staple.
Multi-AZ requirement At least 2 AZs per region Every HA design answer references two or more AZs.

?? Exam-Specific Reminders

  • Map scenario keywords to patterns above before reading answer choices.
  • When you see "cost optimization", check storage class, data transfer, caching, and Spot/RI options.
  • "Highly available" + "multi-region" usually wants Route 53, Global Accelerator, Aurora Global, or S3 CRR.
  • "Operational excellence" hints at CloudWatch alarms, Systems Manager automation, and Infrastructure as Code.
  • Compliance acronyms (HIPAA, PCI, FedRAMP) scream encryption, CloudTrail, Config, GuardDuty, and centralized logging.
  • Always ask: is there a managed or serverless alternative? The exam favors least operational effort.

TIER 1 - ARCHITECTURAL FOUNDATIONS (60-70% Δ‘iểm)


1. AMAZON VPC (Virtual Private Cloud)

πŸ”· VPC - Your Private Datacenter in the Cloud

🎯 Exam Weight

~15% of total exam

⚑ Core Purpose

Network isolation and security

πŸ”‘ Must-Know Topics

  • Public vs. Private Subnets
  • Security Groups vs. NACLs
  • NAT Gateway vs. VPC Endpoints

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ’‘ Mental Model: VPC nhΖ° "MαΊ£nh Δ‘αΊ₯t riΓͺng trΓͺn AWS"

        +----------------------------------------------------------------------------+
        | YOUR VPC (10.0.0.0/16)                                                     |
        | +-----------------------------+    +-----------------------------+         |
        | | Public Subnet (Internet)    |    | Private Subnet (Secure)     |         |
        | | - Web Servers (EC2)         |    | - Database (RDS)            |         |
        | | - Public ELB                |    | - Internal Apps (EC2)       |         |
        | +-----------------------------+    +-----------------------------+         |
        +----------------------------------------------------------------------------+
                      |                                |
        (Internet Gateway) --0.0.0.0/0--> (Route Table) --0.0.0.0/0--> (NAT Gateway)
                      |                                |
         (SG: Allow 80/443)                  (SG: Allow 3306 from Web SG)
            

πŸ“š Core Concepts

πŸ›‘οΈ Security: Security Groups vs. Network ACLs (NACLs)

FeatureSecurity Groups (SG)Network ACLs (NACL)
Applies toInstance level (ENI)Subnet level
StateStateful (return traffic is auto-allowed)Stateless (must explicitly allow return traffic)
RulesAllow rules onlyAllow AND Deny rules
EvaluationAll rules are evaluatedRules evaluated in number order
Use CaseInstance-level firewallSubnet-level firewall (first line of defense)
Exam Tip: 90% of security questions can be solved with Security Groups. Only use NACLs for explicit DENY requirements or subnet-wide blocking.

🌐 Connectivity & Endpoints

⚠️ Common Mistakes & Exam Traps (VPC)

ScenarioWrong AnswerCorrect ApproachKeyword
EC2 in private subnet needs to download patchesMove it to a public subnetUse a NAT Gateway in a public subnet"private" + "internet access"
Block a specific malicious IP addressUse a Security GroupUse a NACL with a DENY rule"block IP" / "deny"
Connect to S3 securely and cost-effectivelyUse a NAT GatewayUse a Gateway VPC Endpoint for S3"private access to S3"
Connect 10+ VPCs togetherUse VPC PeeringUse a Transit Gateway"simplify" / "scale network"

?? Memory Toolkit (VPC)

  • Analogy: City planning mindset: IGW is the city gate, NAT Gateway is the guarded outbound tunnel, VPC Endpoints are private service elevators.
  • Mnemonic: "16 is 65k" and "24 is 256" to size CIDR blocks quickly; pair each private subnet with a matching route table entry.
  • Red-Flag Keywords: "private subnet + internet" -> pick NAT; "transitive connectivity" -> choose Transit Gateway, not peering.
  • Self-Check: Ask (1) inbound or outbound? (2) cross-account or same VPC? (3) do we need audit logs? Answer sequence points to SG/NACL, endpoints, flow logs.

2. EC2, ELB & Auto Scaling

πŸ”· Compute & Scalability Engine

🎯 Exam Weight

~20% of total exam

⚑ Core Purpose

Provide scalable computing capacity

πŸ”‘ Must-Know Topics

  • Instance Types & Pricing
  • ALB vs. NLB
  • Auto Scaling Policies

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

βš™οΈ EC2 (Elastic Compute Cloud)

βš–οΈ ELB (Elastic Load Balancing)

FeatureApplication Load Balancer (ALB)Network Load Balancer (NLB)
LayerLayer 7 (HTTP/HTTPS)Layer 4 (TCP/UDP)
Aware ofRequests, paths, headers (e.g., /users, /images)IP, Port, Protocol
Use CaseWeb applications, microservices, containersHigh-performance, low-latency, static IP needed
Key FeaturePath-based routing, host-based routingUltra-high performance, preserves source IP
Exam Tip: If the question mentions HTTP, HTTPS, paths, or microservices, the answer is almost always **ALB**. If it mentions extreme performance, TCP/UDP, or a static IP for the load balancer, think **NLB**.

πŸ“ˆ Auto Scaling Groups (ASG)

πŸ”— Common Architectural Pattern: The "Well-Architected" Web App

User --> Route 53 --> CloudFront --> ALB --> EC2 Auto Scaling Group
| (in multiple AZs)
v
RDS Multi-AZ DB
            

?? Memory Toolkit (EC2, ELB, ASG)

  • Analogy: Treat Auto Scaling like a smart thermostat: scaling policies are temperature thresholds, load balancers are the house doors directing guests.
  • Mnemonic: "7-4" reminder: ALB lives at Layer 7 (HTTP brains), NLB lives at Layer 4 (network muscle).
  • Red-Flag Keywords: "static IP", "long-lived TCP", "extreme performance" -> choose NLB; "per-second billing", "interrupt tolerant" -> Spot with interruption handling.
  • Self-Check: Before picking an instance family, answer (1) CPU vs memory heavy? (2) Need burst credits? (3) Buying pattern steady or spiky? Map to M/C/R, T burst, or Spot/RI/Savings Plan.

3. AMAZON S3 (Simple Storage Service)

πŸ”· Infinite Object Storage

🎯 Exam Weight

~15% of total exam

⚑ Core Purpose

Durable, scalable object storage

πŸ”‘ Must-Know Topics

  • Storage Classes & Lifecycle
  • Security (Policies & Encryption)
  • Versioning & Replication

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ—‚οΈ S3 Storage Classes

ClassUse CaseKey Feature
S3 StandardFrequently accessed dataLow latency, high throughput
S3 Intelligent-TieringUnknown or changing access patternsAutomatic cost savings
S3 Standard-IAInfrequently accessed, needed quicklyLower storage cost, retrieval fee
S3 One Zone-IAInfrequent, non-critical, reproducible dataCheapest IA, stored in one AZ
S3 Glacier Instant RetrievalArchive data, millisecond accessFastest archive access
S3 Glacier Flexible RetrievalArchive data, minutes to hours accessFlexible retrieval options
S3 Glacier Deep ArchiveLong-term archive, cheapest storage12-48 hour retrieval
Exam Tip: For cost optimization questions, the answer is often **Intelligent-Tiering** for unpredictable access or a **Lifecycle Policy** to move data to IA/Glacier for predictable access.

πŸ›‘οΈ S3 Security

πŸ”„ Data Management

?? Memory Toolkit (S3)

  • Analogy: Think library shelves: buckets are rooms, objects are books, access points are dedicated doorways for different teams.
  • Mnemonic: "Block, Bucket, IAM" order for troubleshooting access (check Block Public Access -> bucket policy -> IAM policy).
  • Red-Flag Keywords: "audit trail", "encryption key control" -> SSE-KMS; "compliance copy in another region" -> Cross-Region Replication.
  • Self-Check: Ask (1) access pattern? (2) retention window? (3) cross-account or public? Those answers drive class, lifecycle, and policy selection.

4. AWS IAM (Identity & Access Management)

πŸ”· Security Foundation

🎯 Exam Weight

~10% of total exam

⚑ Core Purpose

Manage access to AWS services securely

πŸ”‘ Must-Know Topics

  • Users vs. Roles
  • Principle of Least Privilege
  • Policy Evaluation Logic

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ”‘ Core Components

βš–οΈ Policy Evaluation Logic

  1. Starts with an implicit **DENY**.
  2. An explicit **ALLOW** in any policy overrides the implicit deny.
  3. An explicit **DENY** in any policy overrides any allows.

?? Memory Toolkit (IAM)

  • Analogy: IAM is the badge office: users hold permanent badges, roles are temporary visitor stickers, policies are the rule book.
  • Mnemonic: "Deny beats Allow" and "Roles for Resources" (never embed keys) should flash before answering any access question.
  • Red-Flag Keywords: "short-lived credentials", "cross-account" -> create a role with trust policy; "auditable key usage" -> use KMS with CloudTrail.
  • Self-Check: Work policy questions left-to-right: identity policy -> resource policy -> session policy -> explicit denies.
Rule of Thumb: One explicit DENY beats any number of ALLOWs.

βœ… IAM Best Practices (Crucial for the Exam)


5. RDS & Aurora

πŸ”· Managed Relational Databases

🎯 Exam Weight

~10% of total exam

⚑ Core Purpose

Operate and scale a relational database

πŸ”‘ Must-Know Topics

  • Multi-AZ vs. Read Replicas
  • Aurora Features
  • RDS Proxy

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ”„ High Availability vs. Scalability (The MOST important RDS topic)

FeatureMulti-AZ DeploymentRead Replicas
PurposeHigh Availability / Disaster RecoveryRead Scalability / Performance
ReplicationSynchronous to a standby instance in a different AZAsynchronous to one or more read-only copies
FailoverAutomatic, DNS endpoint points to standbyManual promotion to a standalone DB
Use CaseProduction databases that cannot have downtimeRead-heavy applications, reporting, analytics
Mnemonic: **Multi-AZ** is for **A**vailability **Z**ones (Disaster Recovery). **Read Replicas** are for **R**eading (Performance).

✨ Amazon Aurora

πŸ”Œ RDS Proxy

?? Memory Toolkit (RDS & Aurora)

  • Analogy: Multi-AZ is the hot standby kitchen; read replicas are extra serving windows for hungry readers.
  • Mnemonic: "6-3-2" for Aurora storage copies (6 total, across 3 AZs, survive 2 failures).
  • Red-Flag Keywords: "reader endpoint", "cluster cache management" -> Aurora; "thousands of Lambda connections" -> RDS Proxy.
  • Self-Check: Decide first: high availability, read scaling, or write scaling? That choice maps to Multi-AZ, Read Replica, or sharding with Aurora/DynamoDB.

6. AWS Lambda - Serverless Compute

πŸ”· Lambda - The Serverless Revolution

🎯 Exam Weight

~8-10% of total exam

⚑ Core Purpose

Run code without managing servers

πŸ”‘ Must-Know Topics

  • Execution models & triggers
  • Limits & optimization
  • Integration patterns

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ’‘ Mental Model: Lambda nhΖ° "NhΓ’n viΓͺn lΓ m việc theo giờ"

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚ TRADITIONAL SERVER                  vs.        LAMBDA          β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚ Rent whole building 24/7                  Pay per task         β”‚
                        β”‚ Manage infrastructure                     AWS handles servers  β”‚
                        β”‚ Scale manually                            Auto-scales          β”‚
                        β”‚ Idle cost = $$$$                          Idle cost = $0       β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        
                        EVENT SOURCES (Triggers):
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚ API Gateway  │────▢│   LAMBDA     │────▢│  DynamoDB   β”‚
                        β”‚   (HTTP)     β”‚     β”‚  (Process)   β”‚     β”‚   (Store)   β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚                    β–²                     β”‚
                               β”‚                    β”‚                     β”‚
                        β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚  S3 Events    β”‚    β”‚  EventBridge   β”‚   β”‚  DDB Streams  β”‚
                        β”‚ (File upload) β”‚    β”‚  (Scheduled)   β”‚   β”‚  (Changes)    β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ“š Core Concepts

⚑ Lambda Limits (MEMORIZE THESE!)

Resource Limit Exam Relevance
Execution Timeout Max 15 minutes ⭐⭐⭐⭐⭐ For long-running tasks, use ECS/Fargate instead
Memory 128 MB - 10 GB ⭐⭐⭐⭐ More memory = more CPU = faster execution
Deployment Package 50 MB (zipped), 250 MB (unzipped) ⭐⭐⭐ Large dependencies? Use Lambda Layers or Container Images
Concurrent Executions 1000 per region (soft limit) ⭐⭐⭐⭐ Use Reserved Concurrency to prevent throttling
/tmp Storage 512 MB - 10 GB ⭐⭐⭐ Ephemeral storage, cleared after execution
Environment Variables 4 KB total ⭐⭐ For large configs, use Parameter Store/Secrets Manager
Exam Tip: If a question mentions "long-running batch jobs" or "processing takes 20+ minutes", Lambda is NOT the answer. Choose ECS Fargate or Batch instead.

πŸ”— Lambda Integration Patterns (High Exam Probability)

Pattern 1: Serverless Web API

                        User Request β†’ API Gateway β†’ Lambda β†’ DynamoDB
                                     ↓
                                CloudFront (optional caching)
                                
                        Use Case: REST API, mobile backend, single-page apps
                        Benefits: Auto-scaling, pay-per-request, no server management
                        Exam Keywords: "serverless", "cost-effective API", "scales to zero"
                                    

Pattern 2: Real-time File Processing

                        S3 (Upload) β†’ Lambda (Process) β†’ S3 (Output)
                                         ↓
                                    SNS (Notify completion)
                                
                        Use Case: Image thumbnails, video transcoding, data transformation
                        Benefits: Event-driven, parallel processing
                        Exam Keywords: "process uploaded files", "trigger on S3 event"
                                    

Pattern 3: Stream Processing

                        DynamoDB Streams β†’ Lambda β†’ ElastiCache/S3/Another DDB
                        Kinesis Data Stream β†’ Lambda β†’ Data Lake (S3)
                        
                        Use Case: Real-time analytics, data replication, audit logging
                        Benefits: Batch processing, automatic retries
                        Exam Keywords: "real-time data processing", "react to changes"
                                    

Pattern 4: Scheduled Tasks

                        EventBridge (Cron) β†’ Lambda β†’ Task (backup, cleanup, reports)
                        
                        Use Case: Scheduled backups, daily reports, cleanup jobs
                        Benefits: No server to maintain, runs only when needed
                        Exam Keywords: "scheduled task", "cron job", "run daily/hourly"
                                    

πŸ›‘οΈ Lambda Security & Best Practices

πŸ’° Lambda Pricing & Cost Optimization

⚠️ Common Mistakes & Exam Traps (Lambda)

Trap Wrong Answer Correct Answer
Task needs 20 minutes Use Lambda with 20 min timeout Lambda max 15 min! Use ECS Fargate or Batch
Lambda needs database access Put connection string in code Use environment variables + Secrets Manager
High concurrent requests throttling Increase memory Increase Reserved Concurrency or request limit increase
Lambda accessing RDS runs out of connections Increase Lambda memory Use RDS Proxy to pool connections
Large deployment package (300 MB) Split into multiple functions Use Lambda Layers or Container Images (10 GB limit)
Lambda needs internet + VPC resources Configure VPC only VPC Lambda needs NAT Gateway for internet access

?? Memory Toolkit (Lambda)

  • Analogy: Lambda is like hiring Uber drivers: you call them when needed, pay only for the ride, AWS manages the fleet.
  • Mnemonic: "15-10-50-250-1000" limits: 15 min timeout, 10 GB memory max, 50 MB zip, 250 MB unzip, 1000 concurrent executions.
  • Red-Flag Keywords: "serverless", "event-driven", "scales to zero" β†’ Lambda; "long-running", "20+ minutes" β†’ ECS/Fargate.
  • Self-Check: Ask: (1) Duration < 15 min? (2) Stateless? (3) Event-driven? If all YES β†’ Lambda. If NO to any β†’ EC2/ECS.
  • Integration Pattern Recognition:
    • "REST API + database" β†’ API Gateway + Lambda + DynamoDB
    • "Process uploaded files" β†’ S3 Event + Lambda
    • "Scheduled task" β†’ EventBridge + Lambda
    • "Real-time analytics" β†’ Kinesis/DDB Streams + Lambda

7. CloudWatch & Monitoring

πŸ”· CloudWatch - Observability Platform

🎯 Exam Weight

~6-8% of total exam

⚑ Core Purpose

Monitor, collect, analyze AWS resources & applications

πŸ”‘ Must-Know Topics

  • Logs, Metrics, Alarms
  • EventBridge rules
  • Integration patterns

πŸŽ“ Study Priority

⭐⭐⭐⭐ IMPORTANT

πŸ’‘ Mental Model: CloudWatch nhΖ° "Security Camera System"

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚                    CLOUDWATCH ECOSYSTEM                        β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚                                                                β”‚
                        β”‚  πŸ“Ή CloudWatch LOGS          πŸ“Š CloudWatch METRICS             β”‚
                        β”‚  (What happened?)            (How much/many?)                  β”‚
                        β”‚  - Application logs          - CPU, Memory, Network            β”‚
                        β”‚  - System logs               - Custom business metrics         β”‚
                        β”‚  - VPC Flow Logs             - Auto Scaling triggers           β”‚
                        β”‚                                                                β”‚
                        β”‚  🚨 CloudWatch ALARMS        ⏰ EventBridge (CloudWatch Events)β”‚
                        β”‚  (Alert me when...)          (Do something when...)            β”‚
                        β”‚  - Threshold breached        - Schedule (cron)                 β”‚
                        β”‚  - SNS notification          - Trigger Lambda                  β”‚
                        β”‚  - Auto Scaling action       - Event patterns                  β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ“ˆ CloudWatch DASHBOARDS    πŸ” CloudWatch Insights            β”‚
                        β”‚  (Visualization)             (Query & analyze logs)            β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ“Š CloudWatch Metrics

Exam Trap: EC2 memory and disk usage are NOT default metrics! If question asks "monitor EC2 memory", answer is **CloudWatch Agent** or **custom script pushing metrics**.

🚨 CloudWatch Alarms

πŸ“ CloudWatch Logs

⏰ EventBridge (formerly CloudWatch Events)

πŸ”— Common CloudWatch Patterns

Pattern 1: Auto Scaling based on custom metrics

                        Application β†’ Custom Metric (Active Users) β†’ CloudWatch Alarm 
                                                                    ↓
                                                            Auto Scaling Policy
                                                                    ↓
                                                            Scale EC2/ECS tasks
                        
                        Use Case: Scale based on business metrics, not just CPU
                        Exam Keywords: "scale based on queue length", "active connections"
                                    

Pattern 2: Centralized Logging

                        Multiple EC2/ECS β†’ CloudWatch Logs β†’ CloudWatch Logs Insights (Query)
                                                           ↓
                                                    S3 (Archive, Athena analysis)
                        
                        Use Case: Aggregate logs from multiple sources, long-term storage
                        Exam Keywords: "centralized logging", "log aggregation", "analyze logs"
                                    

Pattern 3: Automated Remediation

                        AWS Event β†’ EventBridge β†’ Lambda β†’ Remediation Action
                        (e.g., EC2 stopped β†’ detect β†’ restart instance)
                        
                        Use Case: Auto-recover from failures, compliance enforcement
                        Exam Keywords: "automated response", "self-healing", "compliance automation"
                                    

Pattern 4: Scheduled Tasks

                        EventBridge (Cron: 0 2 * * ? *) β†’ Lambda β†’ Backup/Cleanup Task
                        
                        Use Case: Daily backups, weekly reports, monthly cleanup
                        Exam Keywords: "scheduled", "run every day/week", "cron job"
                                    

πŸ”§ CloudWatch Agent

πŸ†š CloudWatch vs. CloudTrail vs. Config

Service Purpose What it tracks Use Case
CloudWatch Performance monitoring Metrics, logs, alarms "Is my app healthy?" "High CPU usage"
CloudTrail Audit logging (WHO did WHAT) API calls, user activity "Who deleted this S3 bucket?" "Compliance audit"
Config Configuration compliance Resource config changes over time "Is my security group compliant?" "Config drift"

⚠️ Common Mistakes & Exam Traps (CloudWatch)

Trap Wrong Answer Correct Answer
Monitor EC2 memory usage CloudWatch default metrics CloudWatch Agent (memory NOT default)
Long-term log storage (years) Keep in CloudWatch Logs Export to S3 (much cheaper)
Query logs across multiple sources Manual log download CloudWatch Logs Insights
React to EC2 state change Poll EC2 API EventBridge event pattern
Schedule Lambda every hour CloudWatch Alarms EventBridge scheduled rule
Reduce alarm noise (too many alerts) Increase threshold Composite Alarms (combine with AND/OR logic)

?? Memory Toolkit (CloudWatch)

  • Analogy: CloudWatch is your IT operations control room: cameras (logs), gauges (metrics), alert buttons (alarms), and scheduled tasks (EventBridge).
  • Mnemonic: "MALE" for CloudWatch components: Metrics, Alarms, Logs, Events (EventBridge).
  • Red-Flag Keywords:
    • "Memory usage" β†’ CloudWatch Agent (not default)
    • "Who did what" β†’ CloudTrail (not CloudWatch)
    • "Scheduled task" β†’ EventBridge (not Alarms)
    • "Log query" β†’ Logs Insights
    • "Long-term storage" β†’ Export to S3
  • Self-Check:
    • Performance monitoring β†’ CloudWatch
    • Audit trail β†’ CloudTrail
    • Configuration compliance β†’ Config
    • Event-driven automation β†’ EventBridge

Security Services - Deep Dive

πŸ”· Security - Defense in Depth

🎯 Exam Weight

~8-10% of total exam

⚑ Core Purpose

Encryption, secrets management, audit, compliance

πŸ”‘ Must-Know Topics

  • KMS & encryption
  • Secrets Manager vs Parameter Store
  • CloudTrail & Config

πŸŽ“ Study Priority

⭐⭐⭐⭐⭐ CRITICAL

πŸ’‘ Mental Model: AWS Security Layers

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚                    SECURITY LAYERS                             β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚                                                                β”‚
                        β”‚  πŸ” LAYER 1: ENCRYPTION (Data Protection)                      β”‚
                        β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
                        β”‚  β”‚ KMS β†’ Manages encryption keys                         β”‚      β”‚
                        β”‚  β”‚ CloudHSM β†’ Hardware security module for compliance   β”‚      β”‚
                        β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ”‘ LAYER 2: SECRETS & CREDENTIALS                             β”‚
                        β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
                        β”‚  β”‚ Secrets Manager β†’ Rotate DB passwords, API keys      β”‚      β”‚
                        β”‚  β”‚ Parameter Store β†’ Store config, lightweight secrets  β”‚      β”‚
                        β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ” LAYER 3: AUDIT & COMPLIANCE                                β”‚
                        β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
                        β”‚  β”‚ CloudTrail β†’ WHO did WHAT (API audit)                β”‚      β”‚
                        β”‚  β”‚ Config β†’ Resource config compliance                  β”‚      β”‚
                        β”‚  β”‚ GuardDuty β†’ Threat detection (ML-based)              β”‚      β”‚
                        β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ›‘οΈ LAYER 4: NETWORK PROTECTION                                β”‚
                        β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
                        β”‚  β”‚ WAF β†’ Web app firewall (SQL injection, XSS)          β”‚      β”‚
                        β”‚  β”‚ Shield β†’ DDoS protection                             β”‚      β”‚
                        β”‚  β”‚ Firewall Manager β†’ Centralized firewall rules        β”‚      β”‚
                        β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ” AWS KMS (Key Management Service)

Core Concepts

⚑ Envelope Encryption (Critical Concept)

                        WHY ENVELOPE ENCRYPTION?
                        - Encrypting large data with KMS is slow (4KB limit per API call)
                        - Solution: Use data key to encrypt data, use master key to encrypt data key
                        
                        PROCESS:
                        1. Call KMS GenerateDataKey β†’ Get plaintext + encrypted data key
                        2. Use plaintext data key to encrypt your file locally
                        3. Store encrypted file + encrypted data key together
                        4. Delete plaintext data key from memory
                        
                        DECRYPTION:
                        1. Call KMS Decrypt with encrypted data key β†’ Get plaintext data key
                        2. Use plaintext data key to decrypt file
                        3. Delete plaintext data key from memory
                        
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚  KMS Master Key (never leaves KMS)                      β”‚
                        β”‚         β”‚                                               β”‚
                        β”‚         β”œβ”€β”€β–Ά Encrypts Data Key                          β”‚
                        β”‚         β”‚                                               β”‚
                        β”‚  Data Key (plaintext) ──▢ Encrypts actual data         β”‚
                        β”‚                                                         β”‚
                        β”‚  Stored: Encrypted Data + Encrypted Data Key           β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ”‘ Key Policies & Permissions

πŸ“Š KMS Integration with AWS Services

Service Encryption Options Exam Tip
S3 SSE-S3, SSE-KMS, SSE-C SSE-KMS for audit trail + key control
EBS Encrypted with KMS Encrypted EBS β†’ Encrypted snapshots (different regions need re-encryption)
RDS Encrypt at rest with KMS Can't encrypt existing DB, must snapshot β†’ restore to encrypted
Lambda Environment variables encrypted with KMS Default or custom CMK
DynamoDB Encryption at rest (default AWS managed, optional CMK) CMK for compliance + audit

πŸ”„ Key Rotation

Exam Tip: If question asks for "audit trail of key usage" or "automatic key rotation", the answer is KMS with Customer Managed Key (CMK). KMS integrates with CloudTrail to log all key operations.

πŸ”‘ Secrets Manager vs. Parameter Store

Feature Secrets Manager Systems Manager Parameter Store
Purpose Store & rotate secrets Store config & secrets
Pricing $0.40/secret/month + $0.05/10k API calls Free (Standard), $0.05/parameter/month (Advanced)
Automatic Rotation βœ… Built-in for RDS, Redshift, DocumentDB ❌ Manual only
Cross-account Access βœ… Via resource policy ❌ Not supported
Size Limit 64 KB 4 KB (Standard), 8 KB (Advanced)
Encryption Always encrypted with KMS Optional KMS encryption (SecureString)
Versioning βœ… Automatic βœ… Yes
Best For Database passwords, API keys (need rotation) App config, feature flags, static secrets

Decision Tree: When to use which?

                        Question: Do you need AUTOMATIC ROTATION?
                        β”‚
                        β”œβ”€ YES β†’ Secrets Manager
                        β”‚   └─ Examples: RDS passwords, 3rd party API keys
                        β”‚
                        └─ NO β†’ Do you need to store secrets?
                            β”‚
                            β”œβ”€ YES β†’ Parameter Store (SecureString)
                            β”‚   └─ Examples: Static passwords, connection strings
                            β”‚
                            └─ NO (just config) β†’ Parameter Store (String)
                                └─ Examples: App settings, feature flags, URLs
                                

πŸ”— Common Security Patterns

Pattern 1: Lambda accessing RDS with rotated credentials

                        Secrets Manager (RDS password, auto-rotate every 30 days)
                                 ↓
                        Lambda function (retrieves secret at runtime)
                                 ↓
                        RDS (connects with fresh password)
                        
                        Exam Keywords: "rotate database password", "Lambda + RDS security"
                                    

Pattern 2: Multi-account secrets access

                        Account A: Secrets Manager secret
                                 ↓ (resource policy allows Account B)
                        Account B: Lambda function retrieves secret
                        
                        Exam Keywords: "cross-account secret access", "central secrets management"
                                    

πŸ“‹ AWS CloudTrail - API Audit Logging

Exam Tip: CloudTrail is enabled by default (90-day history), but to keep logs longer, you must create a trail with S3 storage. For compliance, enable log file validation and MFA delete on S3 bucket.

πŸ”§ AWS Config - Resource Configuration Compliance

πŸ›‘οΈ GuardDuty - Threat Detection

πŸ”’ WAF & Shield - Web Application Protection

πŸ†š Security Services Comparison

Question Answer
Who deleted this S3 bucket? CloudTrail (API audit)
Is my security group compliant with our policy? Config (compliance rules)
Detect if EC2 instance is compromised GuardDuty (threat detection)
Protect web app from SQL injection WAF (web firewall)
Rotate RDS password automatically Secrets Manager
Encrypt data at rest KMS (encryption keys)
Audit all KMS key usage CloudTrail (KMS is integrated)
Store app config (non-sensitive) Parameter Store

⚠️ Common Mistakes & Exam Traps (Security)

Trap Wrong Answer Correct Answer
Rotate database password automatically Parameter Store Secrets Manager (has built-in rotation)
Encrypt existing RDS database Enable encryption on existing DB Can't encrypt in-place! Snapshot β†’ Restore encrypted
Audit who accessed S3 objects Config CloudTrail Data Events + S3 Server Access Logging
Cross-account secret sharing Parameter Store Secrets Manager (supports resource policy)
Encrypt large file (1 GB) with KMS Call KMS Encrypt directly Use Envelope Encryption (GenerateDataKey)
Detect compromised EC2 instance CloudWatch Alarms GuardDuty (ML-based threat detection)
Store 10 KB secret Secrets Manager Both work, but Parameter Store is free (Advanced tier)

?? Memory Toolkit (Security Services)

  • Analogy: KMS is the safe deposit box, Secrets Manager is the key rotation service, CloudTrail is the security camera, Config is the compliance inspector, GuardDuty is the night watchman.
  • Mnemonic: "KSCCG" for security services: KMS, Secrets, CloudTrail, Config, GuardDuty.
  • Red-Flag Keywords:
    • "Rotate" β†’ Secrets Manager
    • "Audit API" β†’ CloudTrail
    • "Compliance" β†’ Config
    • "Threat detection" β†’ GuardDuty
    • "Encrypt" β†’ KMS
    • "Web protection" β†’ WAF
    • "DDoS" β†’ Shield
  • Decision Flow:
                            Need to store credentials?
                            β”œβ”€ Need rotation? β†’ Secrets Manager
                            └─ No rotation? β†’ Parameter Store
                            
                            Need audit trail?
                            β”œβ”€ WHO did WHAT? β†’ CloudTrail
                            └─ Is config compliant? β†’ Config
                            
                            Need to detect threats? β†’ GuardDuty
                            Need to protect web app? β†’ WAF
                                                
  • Exam Pattern: Multi-service security questions are common. Example: "Encrypt S3 with customer-managed keys + audit all key access" = KMS CMK + CloudTrail.

TIER 2 - ARCHITECTURAL BUILDING BLOCKS (20-25% Δ‘iểm)


8. Route 53 - Global DNS


7. Decoupling Services (SQS & SNS)

FeatureSQS (Simple Queue Service)SNS (Simple Notification Service)
ModelQueue (Pull-based)Topic (Push-based)
CommunicationOne-to-one. A message is processed by one consumer.One-to-many (Fan-out). A message is sent to all subscribers.
Use CaseDecouple applications, buffer requests, throttle workloads.Send notifications, trigger parallel processing.

πŸ”— Common Pattern: SQS + SNS Fan-out

Use SNS to send a single message to multiple SQS queues, allowing different parts of your application to process the same event in parallel, reliably.

Event Source --> SNS Topic --> SQS Queue A --> Processor A
\--> SQS Queue B --> Processor B
\--> SQS Queue C --> Processor C
            

8. CloudFront - Content Delivery Network (CDN)


CloudFormation & Infrastructure as Code

πŸ”· CloudFormation - Automate Infrastructure

🎯 Exam Weight

~5-7% of total exam

⚑ Core Purpose

Define infrastructure as code (IaC)

πŸ”‘ Must-Know Topics

  • Templates & Stacks
  • DependsOn & DeletionPolicy
  • Drift Detection

πŸŽ“ Study Priority

⭐⭐⭐⭐ IMPORTANT

πŸ’‘ Mental Model: CloudFormation nhΖ° "Blueprint cα»§a tΓ²a nhΓ "

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚ TRADITIONAL (Manual)        vs.     CloudFormation (IaC)       β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚ Click in console                    Write template (YAML/JSON) β”‚
                        β”‚ Manual steps                        Automated deployment       β”‚
                        β”‚ Hard to replicate                   Version controlled         β”‚
                        β”‚ Prone to errors                     Consistent & repeatable    β”‚
                        β”‚ No audit trail                      Full change history        β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        
                        CLOUDFORMATION WORKFLOW:
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚   Template   │─────▢│    Stack     │─────▢│  Resources   β”‚
                        β”‚ (YAML/JSON)  β”‚      β”‚  (Created)   β”‚      β”‚   (Running)  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                     β”‚
                                                     β”œβ”€ Update Stack β†’ Change Set (preview)
                                                     β”œβ”€ Delete Stack β†’ All resources deleted
                                                     └─ Rollback on failure (automatic)
                                    

πŸ“š Core Concepts

βš™οΈ Key CloudFormation Features

1. Change Sets (Preview Changes)

2. DependsOn Attribute

                        Resources:
                          MyDB:
                            Type: AWS::RDS::DBInstance
                            DependsOn: MySecurityGroup  # Wait for SG first
                            Properties:
                              ...
                                

3. DeletionPolicy

                        Resources:
                          MyDatabase:
                            Type: AWS::RDS::DBInstance
                            DeletionPolicy: Snapshot  # Create snapshot before deleting
                                

4. UpdateReplacePolicy

5. Stack Policy

6. Drift Detection

7. Rollback Behavior

πŸ”— Cross-Stack References

                        # Stack A (Network Stack)
                        Outputs:
                          VPCId:
                            Value: !Ref MyVPC
                            Export:
                              Name: NetworkStack-VPCID
                        
                        # Stack B (App Stack)
                        Resources:
                          MyInstance:
                            Type: AWS::EC2::Instance
                            Properties:
                              SubnetId: !ImportValue NetworkStack-VPCID
                                
Exam Tip: Can't delete a stack if its exports are being imported by another stack!

πŸ†š CloudFormation vs. Other Deployment Tools

Tool Purpose Best For Exam Relevance
CloudFormation Infrastructure as Code Define entire infrastructure, multi-resource stacks ⭐⭐⭐⭐⭐
Elastic Beanstalk Platform as a Service (PaaS) Deploy apps quickly without infrastructure knowledge ⭐⭐⭐ Know when to use
SAM (Serverless Application Model) Serverless IaC (simplified CloudFormation) Lambda, API Gateway, DynamoDB serverless apps ⭐⭐ Aware of existence
CDK (Cloud Development Kit) Define infrastructure with programming languages Developers who prefer code over YAML/JSON ⭐ Mention in passing
OpsWorks Configuration management (Chef/Puppet) Complex app configuration, legacy systems ⭐ Low priority

When to use what?

                        CloudFormation:
                        - Full control over infrastructure
                        - Complex multi-tier architectures
                        - Need to manage 10+ AWS resources together
                        - Version control and audit trail required
                        
                        Elastic Beanstalk:
                        - "Just deploy my app, I don't care about infrastructure"
                        - Standard web apps (Node.js, Python, Java, .NET, PHP, Ruby, Go)
                        - Auto-scaling, load balancing handled automatically
                        - Developer-friendly, less control
                        
                        SAM:
                        - Serverless applications (Lambda + API Gateway + DynamoDB)
                        - Simplified syntax for serverless (less boilerplate than CloudFormation)
                        - Local testing with SAM CLI
                        
                        Exam Decision Tree:
                        Question mentions "infrastructure as code" + complex resources β†’ CloudFormation
                        Question mentions "developer wants to deploy app easily" β†’ Elastic Beanstalk
                        Question mentions "serverless" + "simplified template" β†’ SAM
                                

πŸ’‘ Advanced CloudFormation Concepts

Nested Stacks

StackSets

Custom Resources

πŸ” Troubleshooting CloudFormation

Issue Cause Solution
Stack stuck in CREATE_IN_PROGRESS Resource creation timeout or dependency issue Check CloudFormation Events, verify resource limits (e.g., VPC limit)
Stack rollback on create Resource creation failed Check Events tab for error details, fix template, retry
UPDATE_ROLLBACK_FAILED Rollback itself failed (e.g., resource manually deleted) Use Continue Update Rollback, manually fix issue
Can't delete stack (DELETE_FAILED) Resource has dependencies or can't be deleted Check Events, manually delete problem resource, retry stack delete
Drift detected Someone manually changed resources Import drift (update template) or revert manual change
Can't update (exports in use) Another stack imports this stack's exports Delete dependent stack first, or change export name

⚠️ Common Mistakes & Exam Traps (CloudFormation)

Trap Wrong Answer Correct Answer
Preserve database on stack deletion Use Retain on stack Set DeletionPolicy: Retain or Snapshot on resource
Preview changes before update Update stack directly Create Change Set first, review, then execute
Deploy to 50 accounts Run CloudFormation 50 times Use StackSets for multi-account deployment
Reuse VPC template across stacks Copy-paste template code Use Nested Stacks or Cross-Stack References
Detect manual infrastructure changes Manually compare Use Drift Detection
Resource replacement will cause downtime Update immediately Check Change Set, use blue/green deployment pattern

?? Memory Toolkit (CloudFormation)

  • Analogy: CloudFormation is like LEGO instructions: template is the manual, stack is the built model, resources are the bricks.
  • Mnemonic: "TSPRCO" for template sections: Template, Stack, Parameters, Resources, Conditions, Outputs.
  • Red-Flag Keywords:
    • "Infrastructure as code" β†’ CloudFormation
    • "Deploy quickly, don't care about infra" β†’ Elastic Beanstalk
    • "Preserve on delete" β†’ DeletionPolicy: Retain
    • "Preview changes" β†’ Change Set
    • "Multi-account" β†’ StackSets
    • "Manual changes detected" β†’ Drift Detection
  • Decision Flow:
                            Need automation?
                            β”œβ”€ Full infrastructure control? β†’ CloudFormation
                            β”œβ”€ Just deploy app easily? β†’ Elastic Beanstalk
                            └─ Serverless app? β†’ SAM (or CloudFormation)
                            
                            CloudFormation features:
                            β”œβ”€ Preview changes? β†’ Change Set
                            β”œβ”€ Preserve data on delete? β†’ DeletionPolicy: Retain/Snapshot
                            β”œβ”€ Multi-account/region? β†’ StackSets
                            β”œβ”€ Reusable components? β†’ Nested Stacks
                            └─ Detect manual changes? β†’ Drift Detection
                                                
  • Exam Pattern: CloudFormation questions often test:
    • DeletionPolicy vs UpdateReplacePolicy
    • When to use Change Sets
    • Cross-stack references (Outputs/Imports)
    • StackSets for multi-account

TIER 3 - SPECIALIZED SERVICES (5-10% Δ‘iểm)


Containers - ECS & Fargate

πŸ”· ECS - Elastic Container Service

🎯 Exam Weight

~3-5% of total exam

⚑ Core Purpose

Run Docker containers on AWS

πŸ”‘ Must-Know Topics

  • ECS vs Fargate vs EKS
  • Task definitions
  • Service types

πŸŽ“ Study Priority

⭐⭐⭐ GOOD TO KNOW

πŸ’‘ Mental Model: Container Services Comparison

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚               AWS CONTAINER SERVICES                           β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚                                                                β”‚
                        β”‚  🐳 ECS (Elastic Container Service)                            β”‚
                        β”‚  β”œβ”€ ECS on EC2: You manage EC2 instances                       β”‚
                        β”‚  β”‚  └─ More control, can use Reserved Instances/Spot          β”‚
                        β”‚  └─ ECS on Fargate: Serverless, AWS manages infrastructure     β”‚
                        β”‚     └─ No EC2 management, pay per task                         β”‚
                        β”‚                                                                β”‚
                        β”‚  ☸️ EKS (Elastic Kubernetes Service)                            β”‚
                        β”‚  └─ Managed Kubernetes for complex container orchestration    β”‚
                        β”‚     └─ Use if you need Kubernetes, multi-cloud portability    β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ“¦ ECR (Elastic Container Registry)                            β”‚
                        β”‚  └─ Docker image registry (like Docker Hub)                   β”‚
                        β”‚     └─ Store and manage container images                      β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        
                        ARCHITECTURE:
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚  ALB (Load Balancer)                                         β”‚
                        β”‚    ↓                                                         β”‚
                        β”‚  ECS Service (maintains desired count of tasks)             β”‚
                        β”‚    ↓                                                         β”‚
                        β”‚  ECS Tasks (running containers)                             β”‚
                        β”‚    β”œβ”€ Task 1 (Container A + Container B)                    β”‚
                        β”‚    β”œβ”€ Task 2 (Container A + Container B)                    β”‚
                        β”‚    └─ Task 3 (Container A + Container B)                    β”‚
                        β”‚    ↓                                                         β”‚
                        β”‚  Launch Type: EC2 (your instances) or Fargate (serverless)  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ“š Core ECS Concepts

βš–οΈ ECS Launch Types

Feature ECS on EC2 ECS on Fargate
Infrastructure You manage EC2 instances Serverless, AWS manages
Pricing Pay for EC2 instances (RI/Spot available) Pay per vCPU + memory per second
Use Case Need control, optimize cost with RI/Spot, large workloads Simplicity, no ops, variable workloads
Scaling Scale EC2 instances (slower) + tasks Scale tasks instantly
Networking EC2 instance network Each task has its own ENI (Elastic Network Interface)
Storage EBS volumes Ephemeral (20 GB) or EFS
Exam Tip: If question says "no infrastructure management" or "serverless containers", choose Fargate. If mentions cost optimization with Reserved Instances or need EC2-level control, choose ECS on EC2.

πŸ†š ECS vs EKS vs Lambda

Scenario Use Lambda Use ECS/Fargate Use EKS
Short-lived tasks (< 15 min) βœ… Perfect fit ❌ Overkill ❌ Too complex
Long-running services (24/7) ❌ Expensive βœ… Ideal βœ… If need K8s
Need Docker/containers ⚠️ Can use container images βœ… Native support βœ… Native support
Microservices architecture βœ… Serverless microservices βœ… Containerized microservices βœ… Complex orchestration
Need Kubernetes ❌ Not supported ❌ Not Kubernetes βœ… Managed Kubernetes
Multi-cloud portability ❌ AWS-specific ⚠️ Docker portable βœ… K8s is portable

Decision Tree:

                        Need to run containers?
                        β”‚
                        β”œβ”€ NO β†’ Use EC2 or Lambda
                        β”‚
                        └─ YES β†’ Do you already use Kubernetes?
                            β”‚
                            β”œβ”€ YES β†’ EKS (Elastic Kubernetes Service)
                            β”‚
                            └─ NO β†’ Do you want to manage EC2 instances?
                                β”‚
                                β”œβ”€ YES β†’ ECS on EC2 (cost optimization with RI/Spot)
                                β”‚
                                └─ NO β†’ ECS on Fargate (serverless, simplest)
                                

πŸ“¦ ECR (Elastic Container Registry)

πŸ”— ECS Integration Patterns

Pattern 1: Microservices with ALB

                        ALB (Path-based routing)
                         β”œβ”€ /api/users β†’ ECS Service A (User microservice)
                         β”œβ”€ /api/orders β†’ ECS Service B (Order microservice)
                         └─ /api/products β†’ ECS Service C (Product microservice)
                        
                        Each service:
                        - ECS Service with Auto Scaling
                        - Fargate tasks in multiple AZs
                        - Connected to RDS/DynamoDB
                        
                        Exam Keywords: "microservices", "containerized", "path-based routing"
                                    

Pattern 2: Batch Processing

                        S3 Event β†’ EventBridge β†’ ECS Task (Fargate, run once)
                                                   ↓
                                            Process file β†’ Output to S3
                        
                        Use Case: Video transcoding, image processing, data transformation
                        Exam Keywords: "batch", "event-driven containers", "run once"
                                    

?? Memory Toolkit (ECS/Fargate)

  • Analogy: ECS is like a shipping port: task definitions are shipping manifests, tasks are loaded containers, services are shipping schedules ensuring containers keep moving.
  • Mnemonic: "FARGATE = Forget About Running & Managing EC2" (serverless containers).
  • Red-Flag Keywords:
    • "Serverless containers" β†’ Fargate
    • "Kubernetes" β†’ EKS
    • "Docker registry" β†’ ECR
    • "No infra management" + "containers" β†’ Fargate
    • "Cost optimize" + "containers" β†’ ECS on EC2 with Spot/RI
  • Exam Pattern: Questions test when to use Lambda vs ECS vs EKS. Key differentiators: execution time (Lambda < 15 min), Kubernetes requirement (EKS), infrastructure preference (Fargate vs EC2).

Data Streaming - Kinesis Family

πŸ”· Kinesis - Real-time Data Streaming

🎯 Exam Weight

~3-4% of total exam

⚑ Core Purpose

Collect, process, analyze real-time streaming data

πŸ”‘ Must-Know Topics

  • Data Streams vs Firehose
  • Analytics use cases
  • Video Streams

πŸŽ“ Study Priority

⭐⭐⭐ GOOD TO KNOW

πŸ’‘ Mental Model: Kinesis Family Overview

                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚                    KINESIS FAMILY                              β”‚
                        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                        β”‚                                                                β”‚
                        β”‚  πŸ“Š Kinesis Data Streams                                       β”‚
                        β”‚  β”œβ”€ Real-time data streaming (custom processing)              β”‚
                        β”‚  β”œβ”€ Retain data 1-365 days                                    β”‚
                        β”‚  β”œβ”€ Manual scaling (shards)                                   β”‚
                        β”‚  └─ Use: Custom real-time analytics, complex processing       β”‚
                        β”‚                                                                β”‚
                        β”‚  🚰 Kinesis Data Firehose                                      β”‚
                        β”‚  β”œβ”€ Load streaming data to destinations                       β”‚
                        β”‚  β”œβ”€ Near real-time (60s buffer)                               β”‚
                        β”‚  β”œβ”€ Auto-scaling (serverless)                                 β”‚
                        β”‚  └─ Use: Load data to S3, Redshift, Elasticsearch, Splunk     β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ”¬ Kinesis Data Analytics                                     β”‚
                        β”‚  β”œβ”€ SQL queries on streaming data                             β”‚
                        β”‚  β”œβ”€ Real-time dashboards                                      β”‚
                        β”‚  └─ Use: Real-time metrics, anomaly detection                 β”‚
                        β”‚                                                                β”‚
                        β”‚  πŸ“Ή Kinesis Video Streams                                      β”‚
                        β”‚  └─ Capture, process, store video streams                     β”‚
                        β”‚     └─ Use: IoT, security cameras, ML on video                β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        
                        DATA FLOW COMPARISON:
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚ Kinesis Data Streams:                                         β”‚
                        β”‚ Producers β†’ Data Stream (shards) β†’ Consumers (custom apps)   β”‚
                        β”‚              ↓ (store 1-365 days)                             β”‚
                        β”‚            Lambda/KCL                                          β”‚
                        β”‚                                                               β”‚
                        β”‚ Kinesis Firehose:                                             β”‚
                        β”‚ Producers β†’ Firehose β†’ S3/Redshift/Elasticsearch/Splunk      β”‚
                        β”‚              ↓ (optional Lambda transform)                    β”‚
                        β”‚          No storage, direct delivery                          β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    

πŸ“Š Kinesis Data Streams (Deep Dive)

🚰 Kinesis Data Firehose

βš–οΈ Data Streams vs Firehose (Critical Comparison)

Feature Kinesis Data Streams Kinesis Firehose
Purpose Custom real-time processing Load data to destinations
Real-time βœ… Real-time (70-200 ms) ⚠️ Near real-time (60s+ buffer)
Data Retention βœ… 1-365 days ❌ No retention
Scaling Manual (add/remove shards) Auto-scaling (serverless)
Consumers Custom (Lambda, KCL, Analytics) Fixed destinations (S3, Redshift, ES, Splunk)
Replay βœ… Can replay data (retained) ❌ Cannot replay
Complexity More complex (manage shards) Simpler (fully managed)
Use Case Custom analytics, ML, complex processing Load to S3/Redshift for analysis
Exam Tip: If question asks "load data to S3" or mentions specific destinations (Redshift, Elasticsearch), answer is Firehose. If mentions "custom processing", "replay data", or "real-time < 1s", answer is Data Streams.

πŸ”¬ Kinesis Data Analytics

πŸ”— Common Kinesis Patterns

Pattern 1: Real-time Analytics Pipeline

                        IoT Devices β†’ Kinesis Data Streams β†’ Lambda (process) β†’ DynamoDB
                                                            ↓
                                                  Kinesis Data Analytics (SQL)
                                                            ↓
                                                      QuickSight (Dashboard)
                        
                        Use Case: IoT sensor data, real-time monitoring, live dashboards
                        Exam Keywords: "real-time analytics", "streaming data", "dashboard"
                                    

Pattern 2: Data Lake Ingestion

                        Application Logs β†’ Kinesis Firehose β†’ S3 (Data Lake)
                                                  ↓                ↓
                                           (optional Lambda)    Athena (query)
                                                                  ↓
                                                            QuickSight (reports)
                        
                        Use Case: Log aggregation, batch analytics, data warehousing
                        Exam Keywords: "load to S3", "data lake", "batch analysis"
                                    

Pattern 3: Real-time ETL

                        Data Sources β†’ Kinesis Firehose β†’ Lambda (transform) β†’ Redshift
                                                                             ↓
                                                                           S3 backup
                        
                        Use Case: Data warehouse, business intelligence
                        Exam Keywords: "transform and load", "Redshift", "ETL"
                                    

⚠️ Common Mistakes & Exam Traps (Kinesis)

Trap Wrong Answer Correct Answer
Load streaming data to S3 Data Streams + custom Lambda Firehose (simplest, fully managed)
Real-time processing < 1 second Firehose Data Streams (Firehose has 60s+ buffer)
Replay data from yesterday Firehose Data Streams (Firehose has no retention)
Custom ML processing on stream Firehose Data Streams + Lambda/KCL
SQL query on streaming data Athena Kinesis Data Analytics (Athena is for S3)
High throughput, need to scale Firehose (auto-scales) Both work; Firehose simpler if loading to destination

?? Memory Toolkit (Kinesis)

  • Analogy: Kinesis is like a river system: Data Streams is the river (flows, retained), Firehose is the dam outlet (direct to destination), Analytics is the water quality sensor (analyze as it flows).
  • Mnemonic: "SFA" for Kinesis family: Streams (custom), Firehose (load), Analytics (SQL).
  • Red-Flag Keywords:
    • "Load to S3/Redshift" β†’ Firehose
    • "Custom processing", "replay" β†’ Data Streams
    • "SQL on streaming" β†’ Data Analytics
    • "Real-time < 1s" β†’ Data Streams
    • "Near real-time", "60s acceptable" β†’ Firehose
  • Decision Flow:
                            Streaming data scenario:
                            β”œβ”€ Need to load to S3/Redshift/ES? β†’ Firehose
                            β”œβ”€ Need real-time < 1s? β†’ Data Streams
                            β”œβ”€ Need to replay data? β†’ Data Streams
                            β”œβ”€ SQL queries on stream? β†’ Data Analytics
                            └─ Custom ML/processing? β†’ Data Streams + Lambda
                                                

DynamoDB - Managed NoSQL Database


10. EFS & FSx - Managed File Systems

ServiceEFS (Elastic File System)FSx for WindowsFSx for Lustre
ProtocolNFS (Linux)SMB (Windows)Lustre (High-Performance Computing)
Use CaseShared file storage for Linux-based EC2 instances, Lambda.Shared file storage for Windows-based applications.High-performance computing, machine learning, big data.
Exam Tip: If multiple Linux instances need to access the same file system simultaneously, the answer is **EFS**.

11. ElastiCache - In-Memory Caching


πŸ”„ ARCHITECTURAL DECISION MAKING

πŸ“Š Key Service Comparisons

πŸ”Ή Storage: S3 vs. EBS vs. EFS

ScenarioUse S3 (Object)Use EBS (Block)Use EFS (File)
Website static assets (images, videos)βœ… Perfect fit❌ Wrong use case❌ Overkill
Boot volume for an EC2 instance❌ Cannot be a boot volumeβœ… Required❌ Cannot be a boot volume
Shared file system for many Linux EC2s❌ Not a file system❌ Single instance onlyβœ… Perfect fit
Store backups and archivesβœ… Cost-effective⚠️ Expensive⚠️ Expensive

πŸ”Ή Database: RDS vs. DynamoDB

ScenarioUse RDS (Relational)Use DynamoDB (NoSQL)
Need complex queries, JOINs, transactionsβœ… Full SQL support❌ Limited query patterns
Need extreme read/write scale with simple lookups⚠️ Can be a bottleneckβœ… Scales massively
Application has unpredictable traffic⚠️ Manual scalingβœ… On-demand auto-scaling
Schema is flexible or changes often❌ Rigid schemaβœ… Schemaless

🌳 Decision Tree: Choosing a Disaster Recovery (DR) Strategy

Start: What are your RTO/RPO requirements?
(RTO: Recovery Time Objective, RPO: Recovery Point Objective)
|
+-- RTO: Hours, RPO: Hours (Low cost, tolerant of downtime)
| `-- Backup and Restore
| `-- Regularly back up data (S3, EBS Snapshots) and restore to a new region when needed.
|
+-- RTO: Tens of minutes, RPO: Minutes (Core services running)
| `-- Pilot Light
| `-- Replicate data to the DR region. Keep a minimal version of the environment (the "pilot light") running.
|
+-- RTO: Minutes, RPO: Seconds (Scaled-down, fully functional copy)
| `-- Warm Standby
| `-- A scaled-down but fully functional copy of your production environment is always running in the DR region.
|
`-- RTO: Seconds, RPO: Near-zero (Full production scale in both regions)
`-- Multi-Site Active-Active
`-- Traffic is served from both regions simultaneously. Use Route 53 for routing. Most expensive and complex.
            

🎯 Exam Scenario Playbook

Pattern 1: "Design for High Availability"

ComponentSolution
EC2 InstancesUse an Auto Scaling Group across multiple AZs.
RDS DatabaseEnable Multi-AZ deployment.
Load BalancerELB is highly available by default.
Static ContentS3 is highly available by default.

Pattern 2: "Design for Cost Optimization"

ComponentSolution
EC2 ComputeUse Spot Instances for fault-tolerant loads; Reserved Instances/Savings Plans for steady loads.
S3 StorageUse Intelligent-Tiering or Lifecycle Policies to move data to cheaper classes.
DatabaseUse Aurora Serverless for unpredictable workloads.
Network TrafficUse VPC Endpoints to avoid NAT Gateway data processing charges.