Chương 19: Decision Trees & Keywords Mapping
Tổng Quan
Chương này tổng hợp cây quyết định (decision trees) giúp chọn nhanh dịch vụ AWS phù hợp, và bảng mapping keywords từ đề thi đến dịch vụ. Đây là công cụ quan trọng nhất khi làm bài thi SAA-C03.
1. 🌳 DECISION TREES — Chọn Service Nhanh
1.1 Compute — Chọn gì?
Bạn cần chạy gì?
│
├─ Code ngắn, event-driven (<15 phút)?
│ └─► Lambda ✅
│
├─ Container?
│ ├─ Đã dùng Kubernetes? → EKS
│ ├─ Muốn đơn giản, AWS-native? → ECS
│ └─ Không muốn quản lý server? → Fargate ✅
│
├─ VM truyền thống, full OS control?
│ └─► EC2
│ ├─ Workload ổn định 24/7? → Reserved Instance
│ ├─ Chịu được gián đoạn? → Spot Instance (tiết kiệm 90%)
│ └─ Không chắc chắn? → On-Demand
│
├─ Web app đơn giản, không muốn config nhiều?
│ └─► Elastic Beanstalk
│
└─ Batch processing (không cần real-time)?
└─► AWS Batch
1.2 Storage — Chọn gì?
Loại data?
│
├─ Object (files, images, videos, backup)?
│ └─► Amazon S3
│ ├─ Truy cập thường xuyên? → S3 Standard
│ ├─ Truy cập 1 lần/tháng? → S3 Standard-IA
│ ├─ Truy cập 1 lần/quý? → Glacier Instant Retrieval
│ ├─ Truy cập 1 lần/năm? → Glacier Flexible Retrieval
│ ├─ Lưu trữ 7-10 năm? → Glacier Deep Archive
│ └─ Không rõ pattern? → S3 Intelligent-Tiering
│
├─ Block storage (gắn vào EC2)?
│ ├─ Cần persist data? → EBS
│ │ ├─ General purpose? → gp3 ✅ (tốt hơn gp2)
│ │ ├─ Cần >16,000 IOPS? → io2 Block Express
│ │ ├─ Throughput cao (big data)? → st1
│ │ └─ Ít truy cập, rẻ nhất? → sc1
│ └─ Tạm thời, IOPS cực cao? → Instance Store (mất khi stop)
│
├─ File system chia sẻ nhiều EC2?
│ ├─ Linux (NFS)? → EFS
│ ├─ Windows (SMB)? → FSx for Windows
│ ├─ HPC, ML training? → FSx for Lustre
│ └─ Multi-protocol? → FSx for NetApp ONTAP
│
└─ Hybrid (on-premises + cloud)?
└─► Storage Gateway
1.3 Database — Chọn gì?
Loại data model?
│
├─ Relational (SQL)?
│ ├─ Cần performance cao nhất? → Aurora (5x MySQL)
│ ├─ Cần engine cụ thể (Oracle, SQL Server)? → RDS
│ ├─ Traffic không dự đoán, muốn tự scale? → Aurora Serverless
│ └─ Cần multi-region DR? → Aurora Global Database
│
├─ NoSQL (Key-Value / Document)?
│ └─► DynamoDB
│ ├─ Cần microsecond latency? → thêm DAX
│ ├─ Multi-region active-active? → Global Tables
│ └─ Traffic không dự đoán? → On-Demand mode
│
├─ In-memory cache?
│ ├─ Cần persistence, replication, HA? → ElastiCache Redis
│ └─ Chỉ cần cache đơn giản? → ElastiCache Memcached
│
├─ Data Warehouse (OLAP, analytics)?
│ └─► Redshift
│
├─ Graph (social, recommendation)?
│ └─► Neptune
│
├─ Ledger (immutable, verifiable)?
│ └─► QLDB
│
├─ Time-series (IoT, metrics)?
│ └─► Timestream
│
└─ Full-text search?
└─► OpenSearch
1.4 Networking — Chọn gì?
Cần kết nối gì?
│
├─ VPC ↔ VPC?
│ ├─ 2-3 VPCs đơn giản? → VPC Peering
│ └─ Nhiều VPCs (>5), hub-spoke? → Transit Gateway
│
├─ On-premises ↔ AWS?
│ ├─ Cần nhanh, tạm thời? → Site-to-Site VPN
│ ├─ Cần bandwidth cao, ổn định? → Direct Connect
│ └─ Remote workers? → Client VPN
│
├─ Load Balancer?
│ ├─ HTTP/HTTPS, path routing? → ALB (Layer 7)
│ ├─ TCP/UDP, static IP, ultra-low latency? → NLB (Layer 4)
│ └─ Third-party appliance? → GWLB
│
├─ DNS routing?
│ └─ Route 53
│ ├─ Failover DR? → Failover routing
│ ├─ Latency thấp nhất? → Latency-based routing
│ ├─ A/B testing? → Weighted routing
│ └─ Content theo vùng? → Geolocation routing
│
└─ Global content delivery?
├─ Static/dynamic content, caching? → CloudFront
└─ TCP/UDP, static IP, gaming? → Global Accelerator
1.5 Security — Chọn gì?
Cần bảo mật gì?
│
├─ Quản lý access?
│ ├─ AWS users/roles? → IAM
│ ├─ Application users? → Cognito
│ ├─ Cross-account access? → STS AssumeRole
│ └─ On-premises AD? → Directory Service / SSO
│
├─ Encryption?
│ ├─ Key management? → KMS
│ ├─ Full control (BYOK, HSM)? → CloudHSM
│ ├─ SSL/TLS certificates? → ACM
│ └─ Secrets, auto-rotation? → Secrets Manager
│
├─ Network security?
│ ├─ Block specific IP? → NACL (có DENY rules)
│ ├─ Allow traffic by port/protocol? → Security Groups
│ ├─ Web exploits (SQLi, XSS)? → WAF
│ └─ DDoS protection? → Shield (Standard = free, Advanced = $3K/month)
│
├─ Monitoring & Audit?
│ ├─ API calls → CloudTrail
│ ├─ Resource compliance → Config
│ └─ Metrics & Alarms → CloudWatch
│
└─ Threat detection?
├─ Intelligent threat detection? → GuardDuty
├─ PII/sensitive data? → Macie
└─ EC2 vulnerability scan? → Inspector
1.6 High Availability — Chọn gì?
Cần HA cho gì?
│
├─ EC2 instances?
│ └─► Multi-AZ + ALB + Auto Scaling Group
│
├─ Database?
│ ├─ RDS? → Multi-AZ (auto failover)
│ ├─ Aurora? → Multi-AZ (đã tích hợp, 6 copies/3 AZs)
│ └─ DynamoDB? → Global Tables (multi-region active-active)
│
├─ Static website?
│ └─► S3 + CloudFront + Cross-Region Replication
│
├─ DNS failover?
│ └─► Route 53 Failover routing + Health Checks
│
└─ Disaster Recovery?
├─ Chi phí thấp nhất? → Backup & Restore (RTO: giờ)
├─ Cân bằng? → Pilot Light (RTO: 10s phút)
├─ Quan trọng? → Warm Standby (RTO: phút)
└─ Mission-critical? → Multi-Site Active-Active (RTO: real-time)
1.7 Cost Optimization — Chọn gì?
Tiết kiệm chi phí?
│
├─ EC2?
│ ├─ Chạy 24/7, biết trước? → Reserved Instance (tiết kiệm 40-72%)
│ ├─ Linh hoạt compute? → Savings Plans
│ ├─ Chịu gián đoạn? → Spot Instance (tiết kiệm 90%)
│ └─ Dev/test, ngắn hạn? → On-Demand
│
├─ Storage?
│ ├─ Tự động chuyển tier? → S3 Lifecycle Policies
│ ├─ Không biết access pattern? → S3 Intelligent-Tiering
│ └─ Archive lâu dài? → Glacier Deep Archive ($0.00099/GB)
│
├─ Database?
│ ├─ Traffic không dự đoán? → Aurora Serverless / DynamoDB On-Demand
│ └─ Traffic ổn định? → Reserved DB Instance
│
├─ Networking?
│ ├─ EC2 ↔ S3 cùng region? → VPC Endpoint (miễn phí data transfer)
│ └─ Giảm NAT Gateway cost? → VPC Endpoints nơi có thể
│
└─ Monitoring chi phí?
├─ Xem chi tiêu → Cost Explorer
├─ Đặt budget alert → AWS Budgets
└─ Recommendations → Trusted Advisor
2. 🔑 KEYWORDS MAPPING — Từ Khoá Đề Thi → Service
Cách dùng: Khi đọc đề thi, xác định keywords → map ngay đến service/concept → loại trừ nhanh.
2.1 💰 Cost Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "cost-effective", "minimize cost" | Spot, Reserved, Lifecycle, Serverless |
| "least expensive" | Glacier Deep Archive, sc1, Spot |
| "reduce data transfer cost" | VPC Endpoints, CloudFront, cùng AZ |
| "pay per use", "no idle cost" | Lambda, Fargate, DynamoDB On-Demand |
| "steady-state", "predictable" | Reserved Instances, Savings Plans |
| "can tolerate interruption" | Spot Instances |
| "reduce storage cost automatically" | S3 Intelligent-Tiering, Lifecycle |
| "long-term archive" | Glacier Deep Archive |
| "right-sizing" | AWS Compute Optimizer, Trusted Advisor |
2.2 ⚡ Performance Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "low latency", "fast response" | CloudFront, ElastiCache, DAX, Global Accelerator |
| "microsecond latency" | DAX (DynamoDB Accelerator) |
| "single-digit millisecond" | DynamoDB |
| "sub-millisecond" | io2 Block Express |
| "real-time" | Kinesis Data Streams (KHÔNG phải Firehose) |
| "near real-time" | Kinesis Data Firehose |
| "high throughput" | st1 (throughput HDD), Kinesis |
| "high IOPS (>16K)" | io2, io2 Block Express |
| "global users, low latency" | CloudFront (caching) hoặc Global Accelerator (TCP/UDP) |
| "cache database queries" | ElastiCache Redis |
| "cache DynamoDB" | DAX |
| "parallel processing" | Cluster Placement Group |
2.3 🔒 Security Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "most secure access to S3" | IAM Role (KHÔNG phải access keys) |
| "block IP address" | NACL (có DENY rules, Security Group không có) |
| "web exploits, SQLi, XSS" | AWS WAF |
| "DDoS protection" | Shield Standard (free) hoặc Shield Advanced |
| "encrypt at rest" | KMS, SSE-S3, SSE-KMS |
| "encrypt in transit" | SSL/TLS, ACM, HTTPS |
| "bring your own key (BYOK)" | CloudHSM |
| "auto-rotate secrets" | Secrets Manager (KHÔNG phải Parameter Store) |
| "audit API calls" | CloudTrail |
| "compliance check resources" | AWS Config |
| "detect threats" | GuardDuty |
| "scan PII/sensitive data" | Macie |
| "vulnerability scanning" | Inspector |
| "cross-account access" | STS AssumeRole |
| "temporary credentials" | STS, IAM Roles |
| "least privilege" | IAM Policy, Permission Boundary |
| "VPC private connectivity" | VPC Endpoints (Gateway/Interface) |
2.4 🏗️ High Availability Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "automatic failover" | RDS Multi-AZ, Aurora |
| "survive AZ failure" | Multi-AZ deployment |
| "survive Region failure" | Multi-Region, Aurora Global, CRR |
| "zero downtime deployment" | Blue/Green deployment |
| "auto-healing" | Auto Scaling Group |
| "decouple components" | SQS, SNS, EventBridge |
| "message queue, buffering" | SQS |
| "fan-out, pub/sub" | SNS + SQS |
| "event routing, rules" | EventBridge |
| "workflow orchestration" | Step Functions |
| "scale reads independently" | Read Replicas |
| "protect against deletion" | S3 Versioning, MFA Delete |
2.5 ☁️ Serverless Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "serverless" | Lambda, Fargate, DynamoDB, Aurora Serverless, S3 |
| "no operational overhead" | Managed/Serverless services |
| "event-driven" | Lambda + EventBridge/SQS/SNS |
| "API backend" | API Gateway + Lambda |
| "serverless SQL query on S3" | Athena |
| "serverless ETL" | AWS Glue |
2.6 🌍 Global & Migration Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "global application" | CloudFront, Global Accelerator, DynamoDB Global Tables |
| "static IP for global" | Global Accelerator |
| "migrate database" | DMS (Database Migration Service) |
| "migrate schema" | SCT (Schema Conversion Tool) |
| "lift and shift" | Application Migration Service (MGN) |
| "large data transfer (TB/PB)" | Snow Family (Snowball, Snowmobile) |
| "online data sync" | DataSync |
| "hybrid storage" | Storage Gateway |
| "data warehouse" | Redshift |
| "query S3 with SQL" | Athena |
2.7 🔧 Operational Keywords
| Keyword trong đề | AWS Service/Concept |
|---|
| "infrastructure as code" | CloudFormation |
| "automate patching" | Systems Manager Patch Manager |
| "centralized logging" | CloudWatch Logs |
| "track configuration changes" | AWS Config |
| "multi-account management" | AWS Organizations + SCPs |
| "parameter/config storage" | Parameter Store (free) hoặc Secrets Manager (auto-rotate) |
| "CI/CD" | CodePipeline, CodeBuild, CodeDeploy |
| "monitor metrics, alarms" | CloudWatch |
| "immutable, ledger" | QLDB |
| "graph database" | Neptune |
3. 🎯 Chiến Thuật Áp Dụng Khi Thi
Bước 1: Đọc câu hỏi cuối cùng trước
Câu hỏi dài → đọc dòng cuối → biết họ hỏi gì → quay lại đọc context
Bước 2: Xác định keywords
"cost-effective" + "infrequent access" → S3 Standard-IA hoặc Glacier
"most secure" + "EC2 access S3" → IAM Role
"real-time" + "streaming data" → Kinesis Data Streams
Bước 3: Loại trừ nhanh
1. Loại 2 đáp án sai rõ ràng
2. So sánh 2 đáp án còn lại
3. Chọn đáp án SÁT YÊU CẦU nhất
Bước 4: Khi phân vân
✅ AWS ưu tiên: managed > self-managed, serverless > server
✅ "MOST" + "LEAST" → tìm đáp án tối ưu nhất, không chỉ "đúng"
✅ Đáp án có "automatically" thường đúng hơn "manually"
Exam Tips 💡
- Decision Trees là công cụ mạnh nhất — luyện tập cho đến khi bạn chọn service trong < 10 giây.
- Keywords giúp loại trừ nhanh — mỗi keyword map đến 1-2 service cụ thể.
- Security Groups KHÔNG CÓ DENY → cần block IP? → NACL.
- CloudTrail = API audit. Config = compliance check. CloudWatch = metrics/alarms.
- Secrets Manager auto-rotate, Parameter Store KHÔNG auto-rotate.
- "Real-time" = Kinesis Data Streams. "Near real-time" = Kinesis Data Firehose.
⬅️ Chương 18: Well-Architected & Exam Tips | Chương 20: Architecture Patterns ➡️