AWS Cheat Sheet

Tổng hợp key points, specs và exam tips cho các dịch vụ cốt lõi trong SAA-C03.

Amazon S3
Storage
Object storage với 11x9 độ bền, khả năng mở rộng gần như vô hạn.

Key points

  • Object storage, flat namespace: bucket → object (không phải file system).
  • Durability 99.999999999% (11x9), availability tùy Storage Class.
  • Max object size: 5 TB; single PUT tối đa 5 GB, trên mức này bắt buộc multipart upload (khuyên dùng từ >100 MB).
  • Storage Classes: Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant/Flexible Retrieval, Glacier Deep Archive.
  • Versioning + MFA Delete bảo vệ ghi đè/xóa nhầm; Object Lock cho WORM (compliance).
  • Encryption: SSE-S3, SSE-KMS, SSE-C, hoặc client-side.
  • Bảo mật access: Bucket Policy, ACL (legacy), IAM, S3 Access Points, Block Public Access.
  • Phân phối nội dung: kết hợp CloudFront + Origin Access Control (OAC) thay vì public bucket.

Specs

Latency:
Milliseconds (Standard)
Min billable duration:
Standard: none · IA: 30 ngày · Glacier Deep Archive: 180 ngày
Retrieval:
Glacier Instant: ms · Flexible: phút-giờ · Deep Archive: giờ

Use cases

  • Data lake, analytics (Athena, Redshift Spectrum).
  • Static website hosting + CloudFront.
  • Backup, archive, compliance (Object Lock + Glacier).
  • Media distribution, big data.

Exam tips

  • Cost tối ưu dài hạn, ít truy cập → Glacier Deep Archive.
  • Cần access ngẫu nhiên mà truy cập thưa → Intelligent-Tiering.
  • Không cho public → Block Public Access + dùng Pre-signed URL hoặc CloudFront + OAC.
  • Cross-region replication (CRR) cho DR; Same-region (SRR) cho log aggregation.
Amazon EC2
Compute
Máy ảo trên cloud với nhiều loại instance và mô hình giá.

Key points

  • Instance families: General (M, T), Compute (C), Memory (R, X), Storage (I, D), Accelerated (P, G, Inf).
  • Pricing: On-Demand, Reserved (Standard/Convertible), Savings Plans, Spot, Dedicated Host/Instance.
  • Storage: EBS (block, gắn 1 AZ), Instance Store (ephemeral, gắn host), EFS (file, multi-AZ).
  • Placement Groups: Cluster (low latency), Spread (anti-fail), Partition (big data).
  • User data chạy 1 lần khi boot (có thể bật rerun).
  • Instance Metadata Service: IMDSv2 (token) được khuyến nghị.
  • IAM Role gắn vào instance để tránh hard-code credentials.

Specs

Max EBS per instance:
Thường 40 volumes (Nitro)
Elastic IP free khi:
Gắn vào instance đang chạy
Hibernate:
Giữ RAM, khởi động nhanh (hỗ trợ một số gia đình)

Use cases

  • Workload truyền thống 3-tier.
  • Batch/HPC với Spot Fleet.
  • Game servers, media encoding, containers (ECS/EKS self-managed).

Exam tips

  • Burstable T-family: chú ý CPU credits; prod bật Unlimited hoặc chọn M/C.
  • Spot = rẻ nhất nhưng có thể bị thu hồi với 2 phút cảnh báo → stateless / fault tolerant.
  • Dedicated Host khi BYOL license theo socket/core.
  • Launch Template thay cho Launch Configuration (legacy).
Amazon EBS
Storage
Block storage gắn vào EC2, tồn tại độc lập vòng đời instance.

Key points

  • Volume gắn trong cùng 1 AZ với instance.
  • Volume types: gp3 (default), gp2, io2/io1 (high IOPS), st1 (throughput), sc1 (cold).
  • Snapshot lưu vào S3 (incremental), dùng để copy cross-region / restore AMI.
  • Encryption at rest bằng KMS; snapshot của volume mã hóa → volume mới mã hóa.
  • Multi-Attach: io1/io2 có thể gắn cùng lúc nhiều Nitro instance trong 1 AZ.

Use cases

  • Root volume cho OS.
  • Database cần IOPS cao (io2 Block Express).
  • Log/analytics throughput cao (st1).

Exam tips

  • Muốn share file giữa nhiều EC2 AZ → EFS, không phải EBS.
  • gp3 tách biệt IOPS và throughput, thường rẻ hơn gp2.
  • DLM (Data Lifecycle Manager) để tự snapshot theo schedule.
Amazon EFS
Storage
NFS file system managed, multi-AZ, mở rộng tự động.

Key points

  • POSIX, mount NFSv4 từ Linux EC2, Lambda (via VPC), ECS, EKS.
  • Storage classes: Standard, IA; có Lifecycle Policy chuyển file sang IA.
  • Performance modes: General Purpose vs Max I/O. Throughput modes: Bursting, Provisioned, Elastic.
  • Encryption at rest (KMS) + in transit (TLS).

Use cases

  • Shared storage cho fleet web/app server.
  • Content management, dev/test shared home dir.

Exam tips

  • Chia sẻ file giữa nhiều AZ → EFS (Linux). Windows → FSx for Windows.
  • HPC Lustre cần FSx for Lustre, không phải EFS.
Amazon VPC
Networking
Logically isolated network trong AWS, mọi tài nguyên VPC thuộc 1 region.

Key points

  • Thành phần: Subnet (AZ), Route Table, IGW, NAT Gateway, NACL (stateless), Security Group (stateful).
  • Public subnet = route 0.0.0.0/0 → IGW; Private subnet dùng NAT Gateway cho egress.
  • VPC Peering: 1-1, không transitive; dùng Transit Gateway để kết nối nhiều VPC.
  • VPC Endpoints: Interface (PrivateLink, ENI) cho hầu hết service; Gateway endpoint cho S3 & DynamoDB (miễn phí).
  • Flow Logs ghi metadata traffic (ACCEPT/REJECT) → CloudWatch Logs / S3 / Kinesis.
  • Bastion Host hoặc SSM Session Manager để truy cập instance private.

Specs

CIDR VPC:
/16 → /28 (IPv4)
SG rules:
Stateful, chỉ allow
NACL rules:
Stateless, có cả allow và deny, đánh số thứ tự

Use cases

  • Kiến trúc multi-tier (web/app/db).
  • Hybrid cloud với Site-to-Site VPN / Direct Connect.

Exam tips

  • Kết nối hybrid rẻ, Internet OK → Site-to-Site VPN. Cần ổn định + thông lượng cao → Direct Connect (có thể DX + VPN làm backup).
  • Truy cập S3 từ VPC không muốn đi Internet → Gateway Endpoint.
  • Blocking an IP ở cấp subnet → dùng NACL.
AWS IAM
Security
Quản lý danh tính và quyền; luôn theo nguyên tắc least privilege.

Key points

  • Users, Groups, Roles, Policies (JSON).
  • Policy types: Identity-based, Resource-based, SCP (Organizations), Permission Boundary, Session policy.
  • Evaluation: Explicit Deny > Explicit Allow > Default Deny.
  • Role cho cross-account access, service-to-service, federated (SAML/OIDC), EC2 Instance Profile.
  • MFA bắt buộc cho root và admin; root chỉ dùng cho tác vụ đặc biệt.
  • Access Analyzer tìm resource chia sẻ ngoài account; Credential Report cho audit.

Use cases

  • Kiểm soát ai truy cập tài nguyên nào.
  • Phân tách quyền dev/staging/prod qua Accounts + SCP.

Exam tips

  • Không bao giờ tạo Access Key cho root.
  • Cross-account → Role + sts:AssumeRole (với ExternalId nếu là third-party).
  • Ứng dụng mobile/web cần temporary credential → Cognito Identity Pools hoặc STS.
Amazon RDS
Database
Relational database managed: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Aurora.

Key points

  • Multi-AZ = HA, synchronous replica, failover tự động; KHÔNG phải read scaling.
  • Read Replicas = scale read, async (MySQL/Postgres/MariaDB tối đa 5/15).
  • Backup: automated (point-in-time, giữ 0-35 ngày) + snapshot thủ công.
  • Encryption bật lúc tạo (KMS); với DB không mã hóa → snapshot → copy mã hóa → restore.
  • RDS Proxy: connection pooling, Secrets Manager integration, giảm failover time.
  • Aurora: storage 6 copy across 3 AZ, auto-scale 10 GB → 128 TB, Aurora Serverless v2.

Use cases

  • OLTP truyền thống.
  • Migration từ on-prem DB với DMS/SCT.

Exam tips

  • HA trong 1 region → Multi-AZ; DR cross-region → Aurora Global Database hoặc Read Replica cross-region.
  • Cần NoSQL key-value, single-digit ms latency → DynamoDB, không phải RDS.
  • Không chạy analytics nặng trên OLTP → offload Redshift hoặc Aurora clone.
Amazon DynamoDB
Database
Serverless NoSQL key-value & document, latency ms, scale tự động.

Key points

  • Capacity modes: On-Demand, Provisioned (có Auto Scaling).
  • Partition key (HASH) / Composite key (HASH + RANGE).
  • Secondary Indexes: LSI (cùng PK, tạo khi create), GSI (khác PK, tạo lúc nào cũng được).
  • Streams + Lambda trigger (CDC), TTL để xóa item tự động.
  • Global Tables: multi-region, multi-active replication.
  • DAX: in-memory cache (microsecond) cho read-heavy.

Use cases

  • Mobile/web apps, session store, shopping cart.
  • Serverless + API Gateway + Lambda + DynamoDB.
  • IoT telemetry, gaming leaderboard.

Exam tips

  • Chịu đựng traffic spike khó đoán → On-Demand.
  • Cache read với latency µs → DAX; không nhầm với ElastiCache (generic).
  • Multi-region active-active → Global Tables.
Elastic Load Balancing
Networking
Phân phối traffic tới targets với độ sẵn sàng cao.

Key points

  • ALB: Layer 7, HTTP/HTTPS, path/host/header routing, hỗ trợ Lambda targets.
  • NLB: Layer 4, TCP/UDP/TLS, static IP / Elastic IP, cực kỳ throughput cao & low latency.
  • GWLB: triển khai firewall/IPS third-party.
  • CLB (classic): legacy.
  • Sticky sessions (ALB: app-based hoặc duration-based cookie).
  • SSL termination và SNI cho nhiều cert.
  • Deregistration delay, slow start, cross-zone load balancing.

Use cases

  • Website: ALB + Auto Scaling Group.
  • Streaming / gaming cần static IP → NLB.

Exam tips

  • Cần giữ IP nguồn + static IP → NLB.
  • Routing theo URL/host → ALB.
  • Bảo vệ app layer DDoS → AWS WAF gắn vào ALB/CloudFront.
Auto Scaling Group
Compute
Tự động scale EC2 theo metric, giữ số instance mong muốn.

Key points

  • Desired / Min / Max capacity; Launch Template bắt buộc với features mới.
  • Scaling policies: Target Tracking, Step, Simple, Scheduled, Predictive.
  • Health Check: EC2 hoặc ELB; instance fail sẽ bị replace.
  • Lifecycle hooks để chạy action trước khi instance in-service / terminate.
  • Kết hợp với ELB để phân phối traffic.

Use cases

  • Web tier co giãn theo tải.
  • Batch xử lý với Spot + Mixed instances.

Exam tips

  • Tối ưu chi phí → Mixed instances policy với Spot + On-Demand baseline.
  • Cooldown ngăn scale liên tục; Warm Pool giảm thời gian scale-out.
AWS Lambda
Compute
Serverless function, billing theo ms, tự scale.

Key points

  • Max timeout 15 phút, memory tới 10 GB, tempory storage /tmp 512 MB (up to 10 GB).
  • Concurrency: Reserved, Provisioned (warm instance), Burst limits.
  • Trigger: API Gateway, S3, DynamoDB Streams, EventBridge, SQS, Kinesis, ALB…
  • Layers để share dependencies, Extensions cho observability.
  • Cold start giảm bằng Provisioned Concurrency hoặc SnapStart (Java).

Use cases

  • Event-driven, microservices, data pipeline nhỏ, automation.
  • Backend API serverless (API Gateway + Lambda).

Exam tips

  • Lambda gọi RDS → dùng RDS Proxy để tránh exhaust connections.
  • Lambda cần ENI trong VPC chỉ khi truy cập resource private; tránh khi không cần.
  • Dead Letter Queue (SQS/SNS) hoặc On-Failure destination cho error handling.
Amazon SQS
Integration
Managed message queue cho decoupling.

Key points

  • Standard: at-least-once, unordered, throughput gần như không giới hạn.
  • FIFO: exactly-once, ordered, 300 TPS (3,000 với batching); tên queue phải kết thúc .fifo.
  • Visibility timeout, long polling, Dead Letter Queue.
  • Message retention tối đa 14 ngày; size 256 KB (dùng S3 cho lớn hơn).

Use cases

  • Decouple producer/consumer, smoothing spikes.
  • Kết hợp Auto Scaling theo ApproximateNumberOfMessagesVisible.

Exam tips

  • Yêu cầu thứ tự chặt chẽ, không trùng → SQS FIFO.
  • Không phải pub/sub; cần fanout → dùng SNS → nhiều SQS.
Amazon SNS
Integration
Pub/Sub messaging, push tới endpoints (email, SMS, HTTP, Lambda, SQS).

Key points

  • Topic Standard và FIFO (với SQS FIFO target).
  • Fan-out pattern: SNS → nhiều SQS subscribers.
  • Message filtering subscription theo attribute.
  • Mã hóa in-transit (HTTPS), at-rest (KMS).

Use cases

  • Notification tới end user (SMS, email).
  • Application event fan-out.

Exam tips

  • Cần buffer + retry giữa service → kết hợp SNS + SQS.
Amazon CloudFront
Networking
CDN toàn cầu của AWS với 400+ PoP.

Key points

  • Origin: S3, ALB, EC2, MediaStore, custom HTTP origin.
  • Behaviors theo path; TTL và cache key tuỳ chỉnh.
  • Signed URL / Signed Cookie bảo vệ nội dung.
  • Origin Access Control (OAC) thay OAI cho S3.
  • Edge functions: CloudFront Functions (JS, light) và Lambda@Edge (Node/Python, mạnh hơn).
  • AWS WAF & Shield tích hợp trực tiếp.

Use cases

  • Static + dynamic content caching.
  • Bảo vệ origin khỏi Internet + giảm latency global.

Exam tips

  • Dùng CloudFront + S3 qua OAC để private static website.
  • Cần low-latency TCP/UDP non-HTTP → Global Accelerator, không phải CloudFront.
Amazon Route 53
Networking
DNS managed với routing policy đa dạng & health checks.

Key points

  • Routing policies: Simple, Weighted, Latency, Failover, Geolocation, Geoproximity, Multi-value.
  • Alias records trỏ tới ELB, CloudFront, S3 website, API Gateway (miễn phí, hỗ trợ apex).
  • Health checks + Failover cho DR.
  • Private Hosted Zone cho nội bộ VPC.

Use cases

  • DNS public, traffic routing đa region.
  • Failover active-passive giữa các region.

Exam tips

  • Cần route theo độ gần user → Latency hoặc Geoproximity (traffic flow).
  • Apex domain trỏ tới ELB phải dùng Alias.
AWS KMS
Security
Managed key service với HSM-backed keys, tích hợp hầu hết dịch vụ AWS.

Key points

  • Key types: AWS owned, AWS managed, Customer managed; Symmetric vs Asymmetric.
  • Key Policy + IAM + Grants kiểm soát quyền.
  • Automatic rotation hàng năm (CMK symmetric), hoặc manual.
  • Envelope encryption: DataKey được mã hóa bởi CMK.
  • CloudHSM khi cần dedicated hardware / FIPS 140-2 Level 3.

Use cases

  • Mã hóa S3, EBS, RDS, Secrets Manager, Parameter Store.

Exam tips

  • Xóa key có waiting period 7-30 ngày.
  • Cross-region: CMK thuộc 1 region; dùng Multi-Region Keys để replica.
Amazon CloudWatch
Security
Monitoring, logs, metrics, alarms, events.

Key points

  • Metrics standard: 5 phút; Detailed: 1 phút; Custom: 1s granular.
  • Logs: agents (CloudWatch Agent), Logs Insights query.
  • Alarms trigger SNS/Auto Scaling/EC2 action.
  • EventBridge (tên mới) = Events rule cho pattern matching.
  • ServiceLens / Synthetics / RUM / Container Insights cho deep observability.

Use cases

  • Monitoring toàn bộ hạ tầng, auto-scale dựa trên metric.

Exam tips

  • Logs cần chuyển analytics dài hạn → subscription filter → Kinesis/Firehose/OpenSearch/S3.
  • Cần audit API call → CloudTrail, không phải CloudWatch.