Ngân hàng đề — AWS Certified Solutions Architect Associate

Tìm thấy 2194 câu.

Câu 1571
A company has implemented a self-managed DNS service on AWS. The solution consists of the following:

•Amazon EC2 instances in different AWS Regions
•Endpoints of a standard accelerator in AWS Global Accelerator

The company wants to protect the solution against DDoS attacks.

What should a solutions architect do to meet this requirement?
  1. A Subscribe to AWS Shield Advanced. Add the accelerator as a resource to protect.
  2. B Subscribe to AWS Shield Advanced. Add the EC2 instances as resources to protect.
  3. C Create an AWS WAF web ACL that includes a rate-based rule. Associate the web ACL with the accelerator.
  4. D Create an AWS WAF web ACL that includes a rate-based rule. Associate the web ACL with the EC2 instances.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một giải pháp self-managed DNS service (dịch vụ DNS tự quản lý) được triển khai trên AWS, bao gồm:

  • Các Amazon EC2 instances nằm ở nhiều AWS Regions khác nhau (để đảm bảo tính sẵn sàng cao và phân tán địa lý).
  • Endpoints của một standard accelerator trong AWS Global Accelerator (dịch vụ này tối ưu hóa đường dẫn mạng đến các endpoints như EC2, giúp traffic routing thông minh qua AWS global network).

Công ty muốn bảo vệ giải pháp chống lại các cuộc tấn công DDoS (Distributed Denial of Service).
🛠️ Yêu cầu chính: Solutions Architect cần chọn giải pháp phù hợp nhất để kích hoạt bảo vệ DDoS toàn diện, tận dụng đặc thù của Global Accelerator (là điểm ingress traffic chính cho toàn bộ hệ thống).
📘 Kiến thức cập nhật AWS (đến 2026): AWS Shield Advanced là lựa chọn hàng đầu cho DDoS protection ở Layer 3/4/7, đặc biệt khi kết hợp với Global Accelerator (hỗ trợ automatic mitigation và visibility cao hơn Shield Standard miễn phí).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Subscribe to AWS Shield Advanced. Add the accelerator as a resource to protect.

Lý do chi tiết:

  • AWS Shield Advanced cung cấp bảo vệ DDoS nâng cao (proactive mitigation, 24/7 DDoS Response Team, cost protection) cho các tài nguyên AWS, bao gồm Global Accelerator.
  • Bằng cách thêm accelerator làm protected resource, toàn bộ traffic đến các endpoints (EC2 instances ở nhiều Regions) sẽ được tự động bảo vệ mà không cần cấu hình riêng cho từng EC2. Global Accelerator hoạt động như "anycast entry point", nên bảo vệ ở đây hiệu quả nhất, giảm thiểu tấn công volumetric/layer 3/4 trước khi chạm đến EC2.
  • Đây là best practice theo AWS Well-Architected Framework (Reliability & Security Pillar), đặc biệt cho multi-Region setups. Shield Advanced tích hợp native với Global Accelerator mà không cần WAF bổ sung cho DDoS cơ bản.
    🛡️ Lợi ích nổi bật: Visibility qua dashboards, automatic scaling mitigation lên đến Tbps, và SLA 99.99% uptime trong DDoS.

📋 Giải thích tất cả các phương án (đúng/sai)

Dưới đây là phân tích từng lựa chọn một cách chi tiết:

  • ✅ Subscribe to AWS Shield Advanced. Add the accelerator as a resource to protect.
    Phương án này hoàn toàn đúng vì Shield Advanced hỗ trợ bảo vệ trực tiếp Global Accelerator (standard accelerator endpoints). Traffic được route qua AWS edge locations, nơi Shield Advanced tự động detect và mitigate DDoS mà không ảnh hưởng đến EC2 backend. Đây là cách tối ưu nhất cho self-managed DNS, tránh cấu hình phức tạp cho multi-Region EC2.

  • ❌ Subscribe to AWS Shield Advanced. Add the EC2 instances as resources to protect.
    Phương án này sai vì dù Shield Advanced hỗ trợ protect EC2, việc thêm từng EC2 instance riêng lẻ ở nhiều Regions sẽ phức tạp và kém hiệu quả. Global Accelerator là điểm tập trung traffic, nên protect accelerator sẽ bao phủ tất cả endpoints tự động. Protect EC2 trực tiếp chỉ phù hợp nếu không dùng Accelerator, và tốn kém hơn (phải tag từng instance).

  • ❌ Create an AWS WAF web ACL that includes a rate-based rule. Associate the web ACL with the accelerator.
    Phương án này sai vì AWS WAF chủ yếu chống Layer 7 attacks (như SQL injection, XSS) với rate-based rules (giới hạn request rate từ IP). WAF không phải giải pháp chính cho DDoS (Layer 3/4 volumetric floods), dù có thể associate với Global Accelerator. DDoS cần Shield (mitigation network-level), WAF chỉ bổ sung sau Shield và có thể bị overload trong tấn công lớn.

  • ❌ Create an AWS WAF web ACL that includes a rate-based rule. Associate the web ACL with the EC2 instances.
    Phương án này sai kép: WAF không associate trực tiếp với EC2 instances (EC2 cần ALB/NLB/CloudFront để attach WAF). Rate-based rule chỉ hiệu quả cho app-layer attacks, không chống DDoS hiệu quả. Với multi-Region EC2, việc này không khả thi và bỏ qua lợi thế của Global Accelerator.

📚 Tài liệu tham khảo (AWS Documentation cập nhật 2026)

🛠️ Kết luận: Giải pháp đúng tận dụng tích hợp native giữa Shield Advanced và Global Accelerator để bảo vệ toàn diện, scalable cho DNS service! Nếu cần lab thực hành, dùng AWS Free Tier với Shield trial.

Câu 1572
An ecommerce company needs to run a scheduled daily job to aggregate and filter sales records for analytics. The company stores the sales records in an Amazon S3 bucket. Each object can be up to 10 GB in size. Based on the number of sales events, the job can take up to an hour to complete. The CPU and memory usage of the job are constant and are known in advance.

A solutions architect needs to minimize the amount of operational effort that is needed for the job to run.

Which solution meets these requirements?
  1. A Create an AWS Lambda function that has an Amazon EventBridge notification. Schedule the EventBridge event to run once a day.
  2. B Create an AWS Lambda function. Create an Amazon API Gateway HTTP API, and integrate the API with the function. Create an Amazon EventBridge scheduled event that calls the API and invokes the function.
  3. C Create an Amazon Elastic Container Service (Amazon ECS) cluster with an AWS Fargate launch type. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
  4. D Create an Amazon Elastic Container Service (Amazon ECS) cluster with an Amazon EC2 launch type and an Auto Scaling group with at least one EC2 instance. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi mô tả một công ty thương mại điện tử cần chạy job hàng ngày theo lịch để tổng hợp (aggregate) và lọc (filter) dữ liệu bán hàng từ bucket Amazon S3. Mỗi object trong S3 có thể lên đến 10 GB, job có thể mất tối đa 1 giờ để hoàn thành, với CPU và memory sử dụng ổn định và biết trước. Kiến trúc sư giải pháp (solutions architect) phải chọn phương án giảm thiểu nỗ lực vận hành (operational effort) nhất.

🛠️ Yêu cầu chính:

  • Xử lý dữ liệu lớn (10 GB/object) → Cần tài nguyên memory/CPU đủ mạnh và thời gian chạy dài.
  • Chạy theo lịch hàng ngày → Sử dụng Amazon EventBridge để trigger.
  • Minimize operational effort → Ưu tiên serverless hoặc managed services, tránh quản lý server/infra thủ công.

📘 Kiến thức AWS cập nhật (đến 2026): Lambda giới hạn 15 phút runtime (không thay đổi), ECS Fargate là serverless containers lý tưởng cho job dài hơi, EventBridge hỗ trợ schedule và invoke ECS tasks trực tiếp.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create an Amazon Elastic Container Service (Amazon ECS) cluster with an AWS Fargate launch type. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.

Lý do:

  • 🛠️ Fargate launch type là serverless (không cần quản lý EC2 instances), tự động scale theo task, hỗ trợ job dài đến hàng giờ với memory/CPU tùy chỉnh (phù hợp dữ liệu 10 GB và 1 giờ chạy).
  • EventBridge schedule invoke ECS task trực tiếp, đơn giản, không overhead.
  • Minimize operational effort: Không patch server, không quản lý cluster infra → Lý tưởng cho DevOps.
  • Nguồn: AWS ECS Fargate Docs & EventBridge ECS Integration (cập nhật 2025).

🔍 Phân tích chi tiết tất cả các phương án

Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên yêu cầu.

  • ❌ Phương án 1 (SAI):
    Create an AWS Lambda function that has an Amazon EventBridge notification. Schedule the EventBridge event to run once a day.
    Lý do sai: Lambda chỉ hỗ trợ runtime tối đa 15 phút (không đủ cho job 1 giờ). Không xử lý tốt dữ liệu 10 GB do memory limit (max 10 GB nhưng ephemeral storage chỉ 512 MB-10 GB, không tối ưu aggregate). Operational effort thấp nhưng vi phạm thời gian chạy.
    📘 Nguồn: Lambda Limits (2026: vẫn 15 phút).

  • ❌ Phương án 2 (SAI):
    Create an AWS Lambda function. Create an Amazon API Gateway HTTP API, and integrate the API with the function. Create an Amazon EventBridge scheduled event that calls the API and invokes the function.
    Lý do sai: Vẫn dùng Lambda → Giới hạn 15 phút, không phù hợp job dài. Thêm API Gateway làm phức tạp hóa (overhead chi phí/latency), tăng operational effort (quản lý API). Không cần thiết cho schedule job.
    📘 Nguồn: Lambda Runtime Limits.

  • ✅ Phương án 3 (ĐÚNG):
    Create an Amazon Elastic Container Service (Amazon ECS) cluster with an AWS Fargate launch type. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
    Lý do đúng: Fargate serverless, hỗ trợ container job dài (1 giờ+), memory/CPU fixed theo nhu cầu (xử lý 10 GB dễ dàng). EventBridge invoke task trực tiếp, zero operational effort (không quản lý server). Hoàn hảo minimize effort.
    📘 Nguồn: ECS Fargate Best Practices (2025 enhancements).

  • ❌ Phương án 4 (SAI):
    Create an Amazon Elastic Container Service (Amazon ECS) cluster with an Amazon EC2 launch type and an Auto Scaling group with at least one EC2 instance. Create an Amazon EventBridge scheduled event that launches an ECS task on the cluster to run the job.
    Lý do sai: EC2 launch type yêu cầu quản lý instances (patch OS, ASG scaling, monitoring), tăng operational effort cao (phải duy trì ít nhất 1 instance luôn chạy). Không serverless như Fargate, vi phạm yêu cầu minimize effort.
    📘 Nguồn: ECS Launch Types Comparison (Fargate vs EC2).

🧩 Tóm tắt: Fargate + EventBridge là lựa chọn serverless tối ưu, cân bằng chi phí và effort cho batch job hàng ngày! 🚀

Câu 1573
A company needs to transfer 600 TB of data from its on-premises network-attached storage (NAS) system to the AWS Cloud. The data transfer must be complete within 2 weeks. The data is sensitive and must be encrypted in transit. The company’s internet connection can support an upload speed of 100 Mbps.

Which solution meets these requirements MOST cost-effectively?
  1. A Use Amazon S3 multi-part upload functionality to transfer the files over HTTPS.
  2. B Create a VPN connection between the on-premises NAS system and the nearest AWS Region. Transfer the data over the VPN connection.
  3. C Use the AWS Snow Family console to order several AWS Snowball Edge Storage Optimized devices. Use the devices to transfer the data to Amazon S3.
  4. D Set up a 10 Gbps AWS Direct Connect connection between the company location and the nearest AWS Region. Transfer the data over a VPN connection into the Region to store the data in Amazon S3.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi xoay quanh việc chuyển 600 TB dữ liệu nhạy cảm từ hệ thống NAS on-premises sang AWS Cloud, với các ràng buộc chính:

  • ⏱️ Thời gian hoàn thành: Phải xong trong vòng 2 tuần (14 ngày).
  • 🔒 Bảo mật: Dữ liệu phải được mã hóa trong quá trình truyền (encrypted in transit).
  • 🌐 Kết nối internet hiện tại: Tốc độ upload chỉ 100 Mbps (khoảng 12.5 MB/s lý thuyết, nhưng thực tế thấp hơn do overhead).
  • 💰 Yêu cầu: Giải pháp tiết kiệm chi phí nhất (MOST cost-effectively).

Vấn đề cốt lõi: Với 600 TB dữ liệu khổng lồ, upload qua internet thông thường là không khả thi vì thời gian tính toán lý thuyết đã vượt quá 2 tuần (thực tế có thể mất hàng trăm ngày do bandwidth hạn chế, mã hóa HTTPS, và độ tin cậy kết nối). Cần giải pháp vật lý hoặc kết nối chuyên dụng để đảm bảo tốc độ cao, bảo mật, và chi phí thấp.
📘 Tài liệu tham khảo: AWS Well-Architected Framework - Storage Lens (2024), AWS Snow Family Documentation (cập nhật 2025): docs.aws.amazon.com/snowball.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Use the AWS Snow Family console to order several AWS Snowball Edge Storage Optimized devices. Use the devices to transfer the data to Amazon S3.

Lý do:

  • 🛠️ AWS Snowball Edge Storage Optimized là thiết bị vật lý chuyên dụng cho chuyển dữ liệu lớn (hàng trăm TB/PB), với dung lượng lên đến 80-210 TB/máy (tùy model 2025), hỗ trợ copy dữ liệu offline từ NAS on-premises sang thiết bị qua 10 Gbps Ethernet hoặc NFS mount.
  • 🚚 Quy trình: Đặt hàng qua Snow Family console → AWS ship thiết bị → Copy dữ liệu on-prem (mã hóa AES-256) → Ship trả AWS → Tự động upload vào S3 (encrypted in transit qua dịch vụ).
  • ⏱️ Thời gian: Hoàn thành trong 2 tuần dễ dàng (copy on-prem chỉ vài ngày, ship 3-5 ngày khứ hồi).
  • 🔒 Bảo mật: Mã hóa full (at-rest và in-transit), tamper-evident.
  • 💰 Tiết kiệm nhất: Chi phí ~$200-400/TB (bao gồm ship), rẻ hơn Direct Connect/VPN dài hạn cho one-time transfer lớn.
  • 📈 Cập nhật 2025-2026: Snowball Edge hỗ trợ S3 integration trực tiếp, cluster mode cho dữ liệu lớn hơn.

❌ Giải thích tất cả các phương án (đúng/sai)

  • SAI ❌ Use Amazon S3 multi-part upload functionality to transfer the files over HTTPS.
    Lý do sai: Multi-part upload qua HTTPS chỉ tận dụng 100 Mbps internet, thời gian upload 600 TB mất >500 ngày (tính: 600 TB ≈ 4.8e15 bits / 100 Mbps ≈ 555 ngày, cộng overhead 20-50%). Không đáp ứng 2 tuần, dù hỗ trợ mã hóa TLS. Không cost-effective cho dữ liệu lớn (retry, bandwidth waste).
    🛠️ Thay thế: Dùng cho <10 TB.

  • SAI ❌ Create a VPN connection between the on-premises NAS system and the nearest AWS Region. Transfer the data over the VPN connection.
    Lý do sai: VPN (Site-to-Site) vẫn giới hạn bởi 100 Mbps internet, thêm overhead mã hóa IPsec ( 20-30% chậm hơn). Thời gian vẫn >500 ngày, không kịp 2 tuần. Chi phí VPN gateway ($0.05/giờ + data transfer) cao cho lượng dữ liệu lớn.
    📘 Tham khảo: AWS VPN Pricing (2025): aws.amazon.com/vpn/pricing.

  • ĐÚNG ✅ Use the AWS Snow Family console to order several AWS Snowball Edge Storage Optimized devices. Use the devices to transfer the data to Amazon S3.
    (Giải thích chi tiết ở phần trên ✅).

  • SAI ❌ Set up a 10 Gbps AWS Direct Connect connection between the company location and the nearest AWS Region. Transfer the data over a VPN connection into the Region to store the data in Amazon S3.
    Lý do sai: Direct Connect 10 Gbps cần cài đặt hạ tầng vật lý (colocation, cross-connect), thời gian setup 2-4 tuần (Port hours + lead time), vượt deadline. Chi phí cao: $0.02-$0.30/GB + port fee $2000+/tháng (tổng >$100k cho 600 TB), không cost-effective cho one-time. VPN trên Direct Connect thừa (Direct Connect đã private/encrypted).
    🛠️ Thay thế: Dùng cho ongoing transfer >1 PB/tháng.
    📘 Tham khảo: AWS Direct Connect Pricing (2026): aws.amazon.com/directconnect/pricing.

Kết luận 💡: Snowball là lựa chọn tối ưu cho data transfer lớn, thời gian ngắn, chi phí thấp theo AWS best practices (Migration Whitepaper 2025). Nếu cần tư vấn thêm, hãy cung cấp chi tiết on-prem setup! 🚀

Câu 1574
A financial company hosts a web application on AWS. The application uses an Amazon API Gateway Regional API endpoint to give users the ability to retrieve current stock prices. The company’s security team has noticed an increase in the number of API requests. The security team is concerned that HTTP flood attacks might take the application offline.

A solutions architect must design a solution to protect the application from this type of attack.

Which solution meets these requirements with the LEAST operational overhead?
  1. A Create an Amazon CloudFront distribution in front of the API Gateway Regional API endpoint with a maximum TTL of 24 hours.
  2. B Create a Regional AWS WAF web ACL with a rate-based rule. Associate the web ACL with the API Gateway stage.
  3. C Use Amazon CloudWatch metrics to monitor the Count metric and alert the security team when the predefined rate is reached.
  4. D Create an Amazon CloudFront distribution with Lambda@Edge in front of the API Gateway Regional API endpoint. Create an AWS Lambda function to block requests from IP addresses that exceed the predefined rate.
Xem giải thích

🧩 Giải thích nội dung câu hỏi
Câu hỏi mô tả một công ty tài chính đang triển khai ứng dụng web trên AWS, sử dụng Amazon API Gateway Regional API endpoint để cung cấp API lấy giá cổ phiếu thời gian thực. Đội ngũ bảo mật phát hiện số lượng yêu cầu API tăng đột biến, lo ngại về HTTP flood attacks (tấn công ngập lụt HTTP) có thể làm ứng dụng ngừng hoạt động.
Nhiệm vụ của Solutions Architect là thiết kế giải pháp bảo vệ ứng dụng khỏi loại tấn công này, với yêu cầu LEAST operational overhead (ít nhất công sức vận hành, ưu tiên giải pháp tự động hóa cao, không cần code tùy chỉnh phức tạp).
Đây là tình huống thực tế về bảo mật AWS, tập trung vào việc chống DDoS/HTTP flood trên API Gateway (phiên bản cập nhật 2026: API Gateway hỗ trợ tích hợp native với AWS WAF cho Regional/Edge endpoints).

✅ Đáp án đúng
Create a Regional AWS WAF web ACL with a rate-based rule. Associate the web ACL with the API Gateway stage.

Lý do lựa chọn:
Giải pháp này sử dụng AWS WAF (Web Application Firewall) với rate-based rule (quy tắc dựa trên tốc độ yêu cầu) để tự động phát hiện và chặn các IP gửi quá nhiều request trong khoảng thời gian ngắn (ví dụ: >2000 requests/5 phút), chính xác chống HTTP flood.

  • Regional WAF ACL phù hợp với Regional API Gateway (không phải Global/Edge).
  • Attach trực tiếp vào API Gateway stage qua console/CLI/Terraform, không cần code, tự động scale, least operational overhead (managed service của AWS).
  • Cập nhật 2026: AWS WAF v2 hỗ trợ rate-based rules lên đến 100.000 requests/5 phút, tích hợp seamless với API Gateway mà không cần proxy trung gian.

🛠️ Phân tích tất cả các phương án

  • ❌ Create an Amazon CloudFront distribution in front of the API Gateway Regional API endpoint with a maximum TTL of 24 hours.
    Phương án này chỉ dùng CloudFront làm cache layer với TTL 24 giờ, giúp giảm tải cho cache hits nhưng không chống HTTP flood hiệu quả. Lý do: Flood attacks thường gây cache miss (yêu cầu động như stock prices), vẫn overwhelm API Gateway; TTL dài không block IP xấu, chỉ caching passive. Overhead thấp nhưng không meet yêu cầu bảo vệ chủ động.

  • ✅ Create a Regional AWS WAF web ACL with a rate-based rule. Associate the web ACL with the API Gateway stage.
    (Như đã giải thích ở trên) Giải pháp managed, zero-code, tự động block rate exceed, tích hợp native với API Gateway stage (Regional). Least overhead, scale toàn cầu.

  • ❌ Use Amazon CloudWatch metrics to monitor the Count metric and alert the security team when the predefined rate is reached.
    Chỉ monitor và alert qua CloudWatch (metric "Count" của API Gateway), không có cơ chế block tự động. Đội ngũ phải manual can thiệp (scale, block IP), dẫn đến high operational overhead và downtime trong flood. Không phải giải pháp bảo vệ thực sự.

  • ❌ Create an Amazon CloudFront distribution with Lambda@Edge in front of the API Gateway Regional API endpoint. Create an AWS Lambda function to block requests from IP addresses that exceed the predefined rate.
    Sử dụng CloudFront + Lambda@Edge custom để track/block IP, nhưng operational overhead cao: Phải code Lambda (state management khó với Edge), deploy global, debug phức tạp, maintain danh sách IP đen. Không hiệu quả bằng WAF managed (WAF làm tốt hơn với ML-based detection).

📘 Tài liệu tham khảo (Cập nhật AWS 2026):

Câu 1575
A meteorological startup company has a custom web application to sell weather data to its users online. The company uses Amazon DynamoDB to store its data and wants to build a new service that sends an alert to the managers of four internal teams every time a new weather event is recorded. The company does not want this new service to affect the performance of the current application.

What should a solutions architect do to meet these requirements with the LEAST amount of operational overhead?
  1. A Use DynamoDB transactions to write new event data to the table. Configure the transactions to notify internal teams.
  2. B Have the current application publish a message to four Amazon Simple Notification Service (Amazon SNS) topics. Have each team subscribe to one topic.
  3. C Enable Amazon DynamoDB Streams on the table. Use triggers to write to a single Amazon Simple Notification Service (Amazon SNS) topic to which the teams can subscribe.
  4. D Add a custom attribute to each record to flag new items. Write a cron job that scans the table every minute for items that are new and notifies an Amazon Simple Queue Service (Amazon SQS) queue to which the teams can subscribe.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi xoay quanh một công ty khởi nghiệp khí tượng sử dụng Amazon DynamoDB để lưu trữ dữ liệu thời tiết cho ứng dụng web tùy chỉnh bán dữ liệu trực tuyến. Họ muốn xây dựng một dịch vụ mới gửi alert đến 4 team nội bộ mỗi khi có sự kiện thời tiết mới được ghi nhận vào bảng DynamoDB. Yêu cầu quan trọng nhất là:

  • Không ảnh hưởng đến hiệu suất của ứng dụng hiện tại (tức là tránh thay đổi logic viết dữ liệu vào DynamoDB từ app).
  • Sử dụng giải pháp với LEAST operational overhead (ít nhất chi phí vận hành, quản lý, bảo trì).

📌 Mục tiêu chính: Phát hiện thay đổi dữ liệu mới (insert/update) trong DynamoDB một cách real-time, gửi thông báo đến nhiều team mà không can thiệp vào app gốc, và tối ưu hóa overhead (không scan định kỳ, không publish từ app).

✅ Đáp án đúng: Enable Amazon DynamoDB Streams on the table. Use triggers to write to a single Amazon Simple Notification Service (Amazon SNS) topic to which the teams can subscribe.

Lý do chọn đáp án này (theo phiên bản AWS mới nhất 2024-2026):

  • DynamoDB Streams là tính năng serverless, real-time capture mọi thay đổi (insert, update, delete) trên bảng DynamoDB mà không ảnh hưởng performance của app viết dữ liệu (chỉ enable streams với chi phí thấp ~$0.02/100,000 read requests).
  • Sử dụng triggers (thường là AWS Lambda tích hợp trực tiếp với DynamoDB Streams qua Event Source Mapping) để xử lý stream và publish message đến một SNS topic duy nhất.
  • 4 team subscribe vào cùng một SNS topic (SNS hỗ trợ fan-out đến nhiều subscriber như email, Lambda, SQS mà không giới hạn).
  • LEAST overhead: Hoàn toàn managed, auto-scale, không cần code cron job hay thay đổi app, chi phí chỉ tính theo usage thực tế. Đây là best practice cho event-driven architecture trên DynamoDB.

🛠️ Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn giữ nguyên văn bản gốc bằng tiếng Anh, kèm giải thích đúng/sai hoàn toàn bằng tiếng Việt:

  • Use DynamoDB transactions to write new event data to the table. Configure the transactions to notify internal teams.
    ❌ Sai. DynamoDB Transactions (TransactWriteItems) chỉ dùng để đảm bảo atomicity cho nhiều item cùng lúc, không hỗ trợ notify/alert trực tiếp (không có cơ chế built-in gửi SNS/SQS từ transaction). Việc "configure transactions to notify" là không khả thi, sẽ yêu cầu thay đổi app và tăng latency/operational overhead cao.

  • Have the current application publish a message to four Amazon Simple Notification Service (Amazon SNS) topics. Have each team subscribe to one topic.
    ❌ Sai. Giải pháp này buộc app hiện tại phải publish message đến 4 SNS topics riêng lẻ mỗi lần insert event, trực tiếp ảnh hưởng performance (tăng latency write, thêm logic code). Tạo 4 topics riêng gây overhead quản lý cao (IAM policies, subscriptions), không tuân thủ yêu cầu "không ảnh hưởng app" và "least overhead".

  • Enable Amazon DynamoDB Streams on the table. Use triggers to write to a single Amazon Simple Notification Service (Amazon SNS) topic to which the teams can subscribe.
    ✅ Đúng. Như đã giải thích ở trên: DynamoDB Streams capture thay đổi real-time không ảnh hưởng app, Lambda trigger publish đến 1 SNS topic (fan-out hiệu quả cho 4 teams). Zero operational overhead nhờ serverless, scale tự động, phù hợp best practice AWS Well-Architected Framework (Reliability & Operational Excellence pillars).

  • Add a custom attribute to each record to flag new items. Write a cron job that scans the table every minute for items that are new and notifies an Amazon Simple Queue Service (Amazon SQS) queue to which the teams can subscribe.
    ❌ Sai. Thêm attribute flag yêu cầu thay đổi app (tăng overhead code). Cron job scan table (sử dụng Scan API) rất tốn kém (chi phí RCU cao, không real-time chỉ check mỗi phút), dễ miss event nếu table lớn. SQS queue cần teams poll, overhead cao so với Streams + SNS, vi phạm nguyên tắc least overhead và real-time.

📘 Tài liệu tham khảo (AWS cập nhật mới nhất đến 2026)

Giải pháp này đảm bảo event-driven, decoupled, scalable! 🚀

Câu 1576
A company wants to use the AWS Cloud to make an existing application highly available and resilient. The current version of the application resides in the company's data center. The application recently experienced data loss after a database server crashed because of an unexpected power outage.

The company needs a solution that avoids any single points of failure. The solution must give the application the ability to scale to meet user demand.

Which solution will meet these requirements?
  1. A Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Use an Amazon RDS DB instance in a Multi-AZ configuration.
  2. B Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group in a single Availability Zone. Deploy the database on an EC2 instance. Enable EC2 Auto Recovery.
  3. C Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Use an Amazon RDS DB instance with a read replica in a single Availability Zone. Promote the read replica to replace the primary DB instance if the primary DB instance fails.
  4. D Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Deploy the primary and secondary database servers on EC2 instances across multiple Availability Zones. Use Amazon Elastic Block Store (Amazon EBS) Multi-Attach to create shared storage between the instances.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi tập trung vào việc di chuyển ứng dụng hiện có từ data center sang AWS để đạt high availability (HA) và resiliency cao, tránh tình trạng mất dữ liệu như sự cố trước đây (database server crash do mất điện đột ngột).

🔑 Yêu cầu chính của giải pháp:

  • Không có single point of failure (SPOF): Phải phân tán tài nguyên qua nhiều Availability Zones (AZ) để chịu lỗi ở một AZ.
  • Khả năng scale theo nhu cầu người dùng: Sử dụng Auto Scaling để tự động mở rộng/thu hẹp tài nguyên.
  • Bảo vệ dữ liệu: Đặc biệt cho database, cần cơ chế failover tự động và replication đồng bộ để tránh mất dữ liệu.

Giải pháp phải sử dụng các dịch vụ AWS chuẩn như EC2, Auto Scaling, RDS để đảm bảo HA mà không phức tạp hóa việc quản lý thủ công. Đây là chủ đề cốt lõi trong AWS Well-Architected Framework (Reliability Pillar), cập nhật đến 2024-2026 với RDS Multi-AZ DB instances hỗ trợ standby tự động sync.

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Use an Amazon RDS DB instance in a Multi-AZ configuration.

Lý do chọn 🛠️:

  • Application servers: EC2 trong Auto Scaling Group (ASG) trải rộng nhiều AZ → Tự động scale theo CPU/load, chịu lỗi AZ (không SPOF), failover seamless.
  • Database: RDS Multi-AZ → Tạo standby replica đồng bộ (synchronous replication) ở AZ khác, failover tự động <60 giây nếu primary fail (như power outage), zero data loss (RPO=0). Hoàn hảo cho resiliency.
  • Đáp ứng đầy đủ: Scale + No SPOF + Bảo vệ data. Đây là best practice cho HA apps trên AWS (không cần quản lý DB thủ công).

📋 Giải thích chi tiết tất cả các phương án

Dưới đây là phân tích từng phương án, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá dựa trên tiêu chí no SPOF, scale, resiliency data (kiến thức AWS mới nhất 2026: RDS Multi-AZ với Provisioned IOPS SSD, ASG hỗ trợ predictive scaling).

  • Phương án 1: Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Use an Amazon RDS DB instance in a Multi-AZ configuration.
    ✅ Đúng hoàn toàn 🏆: ASG multi-AZ đảm bảo app scale và HA; RDS Multi-AZ sync replication + auto-failover bảo vệ DB khỏi outage (như power loss ở data center cũ). Không SPOF, RPO=0, dễ quản lý.

  • Phương án 2: Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group in a single Availability Zone. Deploy the database on an EC2 instance. Enable EC2 Auto Recovery.
    ❌ Sai 🚫: ASG chỉ single AZ → SPOF nếu AZ fail (power outage ảnh hưởng toàn AZ). DB trên EC2 self-managed + Auto Recovery chỉ restart instance (không replicate data, dễ mất data như sự cố cũ). Không scale DB, quản lý thủ công cao.

  • Phương án 3: Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Use an Amazon RDS DB instance with a read replica in a single Availability Zone. Promote the read replica to replace the primary DB instance if the primary DB instance fails.
    ❌ Sai ⚠️: App HA tốt (multi-AZ ASG), nhưng RDS read replica là async replication (có lag data, RPO >0), chỉ ở single AZ → SPOF cho replica. Phải promote thủ công (không auto-failover), downtime cao (>1 phút), không phù hợp resiliency.

  • Phương án 4: Deploy the application servers by using Amazon EC2 instances in an Auto Scaling group across multiple Availability Zones. Deploy the primary and secondary database servers on EC2 instances across multiple Availability Zones. Use Amazon Elastic Block Store (Amazon EBS) Multi-Attach to create shared storage between the instances.
    ❌ Sai 🔧: App HA tốt, nhưng DB self-managed trên EC2 với EBS Multi-Attach chỉ hỗ trợ io1/io2 volumes (không phải shared storage thực thụ cho DB cluster như Oracle RAC). Không sync data tự động, dễ corruption/inconsistency khi fail, quản lý phức tạp (setup replication thủ công). Vi phạm no SPOF thực sự cho data, không best practice (AWS recommend RDS).

📘 Tài liệu tham khảo (AWS cập nhật 2024-2026)

Giải pháp này giúp đạt 5 nines availability dễ dàng! 🚀 Nếu cần thiết kế sâu hơn, hỏi thêm nhé!

Câu 1577
A company needs to ingest and handle large amounts of streaming data that its application generates. The application runs on Amazon EC2 instances and sends data to Amazon Kinesis Data Streams, which is configured with default settings. Every other day, the application consumes the data and writes the data to an Amazon S3 bucket for business intelligence (BI) processing. The company observes that Amazon S3 is not receiving all the data that the application sends to Kinesis Data Streams.

What should a solutions architect do to resolve this issue?
  1. A Update the Kinesis Data Streams default settings by modifying the data retention period.
  2. B Update the application to use the Kinesis Producer Library (KPL) to send the data to Kinesis Data Streams.
  3. C Update the number of Kinesis shards to handle the throughput of the data that is sent to Kinesis Data Streams.
  4. D Turn on S3 Versioning within the S3 bucket to preserve every version of every object that is ingested in the S3 bucket.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một tình huống thực tế trong AWS:
Một công ty đang xử lý dữ liệu streaming lớn từ ứng dụng chạy trên Amazon EC2. Dữ liệu được gửi đến Amazon Kinesis Data Streams (cấu hình mặc định). Ứng dụng consume dữ liệu từ Kinesis mỗi hai ngày một lần (every other day) và ghi vào Amazon S3 để xử lý BI (business intelligence).
Vấn đề chính: S3 không nhận đủ dữ liệu mà ứng dụng đã gửi vào Kinesis.
🔍 Nguyên nhân cốt lõi: Kinesis Data Streams có data retention period mặc định là 24 giờ (1 ngày). Khi consume sau 2 ngày, dữ liệu cũ hơn 24 giờ đã bị xóa tự động, dẫn đến mất mát dữ liệu. Không có dấu hiệu vấn đề throughput (như throttling) hay lỗi producer/consumer.

✅ Đáp án đúng

Update the Kinesis Data Streams default settings by modifying the data retention period.

Lý do chọn đáp án này:
🛠️ Kinesis Data Streams lưu trữ dữ liệu tối đa theo retention period (mặc định 24 giờ, có thể tăng lên 1-365 ngày kể từ năm 2018 và vẫn áp dụng đến 2026). Vì ứng dụng consume mỗi 2 ngày, dữ liệu bị xóa trước khi đọc, gây mất mát.
Giải pháp: Tăng retention period lên ít nhất 48 giờ (hoặc hơn) qua AWS Console, CLI hoặc SDK (ví dụ: UpdateStream API với RetentionPeriodHours=48). Điều này đảm bảo dữ liệu vẫn còn khi consume, mà không ảnh hưởng chi phí lớn (chi phí retention dựa trên shard-hours).
📘 Tài liệu tham khảo: AWS Kinesis Data Streams - Data Retention (cập nhật 2024-2026).

📋 Giải thích chi tiết từng phương án

  • Update the Kinesis Data Streams default settings by modifying the data retention period.
    ✅ Đúng. Như phân tích trên, đây là nguyên nhân gốc rễ và giải pháp trực tiếp. Retention period là thiết lập mặc định cần thay đổi để giữ dữ liệu lâu hơn chu kỳ consume (2 ngày). Không cần thay đổi shard hay code ứng dụng.

  • Update the application to use the Kinesis Producer Library (KPL) to send the data to Kinesis Data Streams.
    ❌ Sai. KPL (Kinesis Producer Library) giúp tối ưu hóa producer bằng cách batch PutRecords, aggregation và retry tự động, giảm tải CPU/network cho EC2. Tuy nhiên, vấn đề không phải ở producer (dữ liệu đã gửi thành công vào Kinesis), mà là dữ liệu bị xóa do retention trước khi consume. KPL không ảnh hưởng retention.

  • Update the number of Kinesis shards to handle the throughput of the data that is sent to Kinesis Data Streams.
    ❌ Sai. Số shard quyết định throughput (ingress: 1MB/s/shard, egress: 2MB/s/shard). Câu hỏi không đề cập throttling (WriteProvisionedThroughputExceeded), và dữ liệu đã vào Kinesis nhưng mất khi consume muộn. Tăng shard chỉ tốn kém hơn, không giải quyết retention.

  • Turn on S3 Versioning within the S3 bucket to preserve every version of every object that is ingested in the S3 bucket.
    ❌ Sai. S3 Versioning giữ các phiên bản object cũ khi overwrite/delete, nhưng vấn đề là dữ liệu chưa được write đầy đủ vào S3 do mất ở Kinesis. Bật versioning không tạo ra dữ liệu bị thiếu, chỉ giữ version sau khi write.

🧠 Kết luận: Vấn đề thuần túy về data lifecycle trong Kinesis. Giải pháp retention là best practice cho streaming data với chu kỳ consume không đều (dựa trên DOP-C02 exam blueprint 2024-2026).

Câu 1578
A developer has an application that uses an AWS Lambda function to upload files to Amazon S3 and needs the required permissions to perform the task. The developer already has an IAM user with valid IAM credentials required for Amazon S3.

What should a solutions architect do to grant the permissions?
  1. A Add required IAM permissions in the resource policy of the Lambda function.
  2. B Create a signed request using the existing IAM credentials in the Lambda function.
  3. C Create a new IAM user and use the existing IAM credentials in the Lambda function.
  4. D Create an IAM execution role with the required permissions and attach the IAM role to the Lambda function.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi này xoay quanh việc cấp quyền (permissions) cho một hàm AWS Lambda để ứng dụng có thể upload files lên Amazon S3. Cụ thể:

  • Một developer đang phát triển ứng dụng sử dụng AWS Lambda function để thực hiện việc upload files vào Amazon S3.
  • Developer đã có một IAM user với credentials hợp lệ để truy cập S3 (nghĩa là user này có quyền S3 cần thiết).
  • Vai trò của Solutions Architect là quyết định hành động phù hợp nhất để cấp quyền cho Lambda function thực hiện nhiệm vụ này một cách an toàn, tuân thủ nguyên tắc least privilege và best practices của AWS.

Mục tiêu chính: Lambda cần quyền S3 (như s3:PutObject) để upload files, nhưng không nên hardcode credentials của IAM user vào code Lambda vì lý do bảo mật (credentials có thể bị lộ, không phù hợp với serverless model). Thay vào đó, AWS khuyến nghị sử dụng IAM execution role cho Lambda.
(Kiến thức cập nhật đến 2026: AWS Lambda vẫn yêu cầu execution role ARN khi tạo function, hỗ trợ fine-grained permissions qua IAM policies, và tích hợp với AWS IAM Access Analyzer để kiểm tra quyền thừa - theo AWS Well-Architected Framework cho Serverless pillar).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Create an IAM execution role with the required permissions and attach the IAM role to the Lambda function.

Lý do:
🛠️ Đây là best practice chuẩn của AWS cho Lambda functions. Khi Lambda thực thi, AWS STS (Security Token Service) tự động cung cấp temporary credentials từ execution role này, cho phép Lambda gọi các API S3 mà không cần lưu credentials trong code.

  • Tạo IAM role với policy cho phép s3:PutObject (hoặc bucket policy tương ứng).
  • Attach role vào Lambda qua console/CLI/CDK (ARN của role).
  • Ưu điểm: Bảo mật cao (temporary creds, auto-rotate), scalable, và tuân thủ shared responsibility model. Không phụ thuộc vào IAM user hiện có của developer.
    (Ví dụ policy: {"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:PutObject"],"Resource":"arn:aws:s3:::bucket-name/*"}]})

❌ Phân tích tất cả các phương án (đúng/sai)

Dưới đây là phân tích từng lựa chọn một cách chi tiết. Tôi giữ nguyên văn bản gốc bằng tiếng Anh, chỉ giải thích lý do đúng/sai bằng tiếng Việt:

  • Add required IAM permissions in the resource policy of the Lambda function.
    ❌ Sai. Resource policy của Lambda chỉ dùng để kiểm soát ai có thể invoke Lambda (ví dụ: từ API Gateway hoặc S3 events), không cấp quyền cho Lambda truy cập service khác như S3. Permissions cho Lambda phải qua execution role, không phải resource policy. Sử dụng sai sẽ dẫn đến lỗi "Access Denied" khi gọi S3 API.

  • Create a signed request using the existing IAM credentials in the Lambda function.
    ❌ Sai. Việc tạo signed request (presigned URL) bằng credentials của IAM user hiện có sẽ yêu cầu hardcode hoặc lưu credentials vào Lambda code/environment variables, vi phạm bảo mật nghiêm trọng (credentials có thể bị lộ qua logs hoặc decompile). Lambda serverless không khuyến khích cách này; execution role là cách chuẩn thay thế.

  • Create a new IAM user and use the existing IAM credentials in the Lambda function.
    ❌ Sai. Tạo IAM user mới rồi dùng credentials của nó (hoặc existing) trong Lambda vẫn là hardcoding credentials, không an toàn và không scalable. AWS không hỗ trợ attach IAM user trực tiếp vào Lambda; Lambda chỉ dùng roles, không dùng user credentials. Cách này dễ bị lộ key và không tuân thủ least privilege.

  • Create an IAM execution role with the required permissions and attach the IAM role to the Lambda function.
    ✅ Đúng (như đã giải thích ở trên). Đây là phương pháp chính thức, an toàn nhất theo tài liệu AWS.

📘 Tài liệu tham khảo (cập nhật mới nhất đến 2026)

Hy vọng phân tích này giúp bạn ôn thi DOP-C02 hiệu quả! 🚀 Nếu cần thêm ví dụ code Terraform/CloudFormation, hãy hỏi nhé!

Câu 1579
A company has deployed a serverless application that invokes an AWS Lambda function when new documents are uploaded to an Amazon S3 bucket. The application uses the Lambda function to process the documents. After a recent marketing campaign, the company noticed that the application did not process many of the documents.

What should a solutions architect do to improve the architecture of this application?
  1. A Set the Lambda function's runtime timeout value to 15 minutes.
  2. B Configure an S3 bucket replication policy. Stage the documents in the S3 bucket for later processing.
  3. C Deploy an additional Lambda function. Load balance the processing of the documents across the two Lambda functions.
  4. D Create an Amazon Simple Queue Service (Amazon SQS) queue. Send the requests to the queue. Configure the queue as an event source for Lambda.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một ứng dụng serverless được triển khai trên AWS, trong đó một hàm AWS Lambda được kích hoạt tự động mỗi khi có tài liệu mới được tải lên Amazon S3 bucket. Hàm Lambda này chịu trách nhiệm xử lý các tài liệu đó. Sau một chiến dịch marketing gần đây (gây ra lượng tài liệu upload tăng đột biến), công ty phát hiện nhiều tài liệu không được xử lý.

Vấn đề cốt lõi ở đây là throttling và giới hạn của S3 Event Notifications: Khi có burst traffic cao (nhiều file upload đồng thời), S3 chỉ gửi khoảng 1.000 event notifications mỗi giây mỗi bucket, và Lambda invocations có thể bị giới hạn (concurrency limit mặc định 1.000 cho tài khoản mới). Kết quả là một số event bị miss hoặc queue không kịp xử lý, dẫn đến mất dữ liệu.

Solutions Architect cần cải thiện architecture để xử lý tải cao, đảm bảo tính bền vững (durability) và không mất event, theo best practices serverless mới nhất của AWS (cập nhật đến 2026, với Lambda hỗ trợ SQS/SNS làm buffer).

📘 Tài liệu tham khảo:

✅ Đáp án đúng

Create an Amazon Simple Queue Service (Amazon SQS) queue. Send the requests to the queue. Configure the queue as an event source for Lambda.

Lý do chọn đáp án này:

  • 🛠️ Giải quyết gốc rễ vấn đề: Thay vì trigger Lambda trực tiếp từ S3 (dễ miss event do throttling), cấu hình S3 Event Notification gửi message vào SQS queue trước (làm buffer). Sau đó, SQS làm event source cho Lambda (polling-based trigger), đảm bảo 100% durability (SQS lưu message đến 14 ngày, retry tự động).
  • 📈 Xử lý burst traffic: SQS queue hóa tải, Lambda scale tự động theo độ dài queue (batch size lên đến 10.000 messages). Không còn mất document.
  • 🔄 Best practice 2026: AWS khuyến nghị pattern này cho high-throughput workloads (ví dụ: image processing pipelines).
  • ✅ Hoàn toàn serverless, chi phí thấp (SQS ~$0.40/million requests).

❌ Phân tích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc:

  • Set the Lambda function's runtime timeout value to 15 minutes.
    ❌ Sai: Timeout chỉ ảnh hưởng thời gian chạy của từng invocation (tối đa 15 phút từ 2022), không giải quyết throttling events từ S3. Vấn đề là không trigger được Lambda chứ không phải chạy lâu. Tăng timeout có thể làm chi phí cao hơn mà không fix mất event.

  • Configure an S3 bucket replication policy. Stage the documents in the S3 bucket for later processing.
    ❌ Sai: Replication dùng để copy object giữa buckets (cross-region/CRR), không phải buffer events. "Staging" không tự động trigger processing, vẫn cần cơ chế poll thủ công (không serverless). Không giải quyết burst notifications, chỉ làm phức tạp architecture vô ích.

  • Deploy an additional Lambda function. Load balance the processing of the documents across the two Lambda functions.
    ❌ Sai: Thêm Lambda thứ hai không giải quyết nguồn gốc throttling từ S3 (vẫn chỉ nhận events hạn chế). "Load balance" không khả thi vì S3 không hỗ trợ fan-out tự động đến nhiều Lambda; cần provisioned concurrency (đắt đỏ). Scale ngang Lambda không fix lost events.

Giải pháp đúng duy nhất là SQS decoupling, đảm bảo reliability cao nhất theo AWS re:Invent 2025 updates! 🚀

Câu 1580 Chọn nhiều đáp án
A solutions architect is designing the architecture for a software demonstration environment. The environment will run on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The system will experience significant increases in traffic during working hours but is not required to operate on weekends.

Which combination of actions should the solutions architect take to ensure that the system can scale to meet demand? (Choose two.)
  1. A Use AWS Auto Scaling to adjust the ALB capacity based on request rate.
  2. B Use AWS Auto Scaling to scale the capacity of the VPC internet gateway.
  3. C Launch the EC2 instances in multiple AWS Regions to distribute the load across Regions.
  4. D Use a target tracking scaling policy to scale the Auto Scaling group based on instance CPU utilization.
  5. E Use scheduled scaling to change the Auto Scaling group minimum, maximum, and desired capacity to zero for weekends. Revert to the default values at the start of the week.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi mô tả một solutions architect đang thiết kế kiến trúc cho môi trường demo phần mềm (software demonstration environment) trên AWS. Hệ thống sử dụng EC2 instances trong Auto Scaling group (ASG) đặt sau Application Load Balancer (ALB). Đặc thù:

  • Traffic tăng mạnh vào giờ làm việc (working hours).
  • Không cần hoạt động vào cuối tuần (weekends). Mục tiêu: Chọn 2 hành động kết hợp (combination of actions) để ASG scale linh hoạt, đáp ứng nhu cầu traffic mà vẫn tối ưu chi phí và tài nguyên. 🛠️ Thách thức chính: Cần scale tự động theo metric (như CPU) cho giờ cao điểm, và tắt/tắt hệ thống theo lịch trình cuối tuần để tránh lãng phí.

✅ Đáp án đúng (Chọn 2)

Hai lựa chọn đúng là:

  1. Use a target tracking scaling policy to scale the Auto Scaling group based on instance CPU utilization.
  2. Use scheduled scaling to change the Auto Scaling group minimum, maximum, and desired capacity to zero for weekends. Revert to the default values at the start of the week.

Lý do chọn:

  • Kết hợp target tracking policy (scale theo CPU utilization target, ví dụ 50-70%) giúp ASG tăng/giảm instances tự động khi traffic cao giờ làm việc, đảm bảo performance ổn định mà không over-provision.
  • Scheduled scaling cho phép tự động set min/max/desired capacity = 0 cuối tuần (scale down hoàn toàn), rồi revert về giá trị mặc định đầu tuần – lý tưởng cho pattern predictable (dự đoán được), tiết kiệm chi phí EC2 lên đến 100% cuối tuần. 🧩 Hoàn hảo vì: Đáp ứng cả dynamic scaling (giờ cao điểm) và predictable scaling (lịch trình), phù hợp best practice AWS Auto Scaling (cập nhật đến 2026 với hỗ trợ predictive scaling nâng cao).

📋 Phân tích tất cả các phương án

Dưới đây là phân tích từng lựa chọn một cách chi tiết, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên tài liệu AWS mới nhất.

  • ❌ Use AWS Auto Scaling to adjust the ALB capacity based on request rate.
    Sai vì: Auto Scaling không hỗ trợ scale ALB capacity trực tiếp (ALB là managed service, tự động scale theo request). Scaling ALB dựa request rate dùng ALB target group metrics nhưng qua ASG cho EC2, không phải "adjust ALB capacity". Phương án này nhầm lẫn, không tồn tại policy như vậy (AWS docs: ALB scales automatically up to limits).

  • ❌ Use AWS Auto Scaling to scale the capacity of the VPC internet gateway.
    Sai vì: Internet Gateway (IGW) là fully managed, không scale bằng Auto Scaling – nó xử lý traffic lên đến 100 Gbps tự động, không có capacity limit cần scale. ASG chỉ áp dụng cho EC2/ECS/EKS, không phải network components như IGW.

  • ❌ Launch the EC2 instances in multiple AWS Regions to distribute the load across Regions.
    Sai vì: Multi-Region tăng latency/complexity/cost không cần thiết cho demo environment đơn giản (single ASG + ALB). Không giải quyết scale theo giờ làm/cuối tuần, mà cần Global Accelerator hoặc Route 53 nếu multi-Region – không phù hợp yêu cầu.

  • ✅ Use a target tracking scaling policy to scale the Auto Scaling group based on instance CPU utilization.
    Đúng vì: Target tracking policy (mới nhất AWS 2026) tự động maintain CPU utilization target (e.g., 50%) bằng cách add/remove instances. Hoàn hảo cho traffic spikes giờ làm việc, dễ config qua Console/CLI, hỗ trợ warm pools để giảm cold start.

  • ✅ Use scheduled scaling to change the Auto Scaling group minimum, maximum, and desired capacity to zero for weekends. Revert to the default values at the start of the week.
    Đúng vì: Scheduled scaling (recurring) cho phép set capacity theo lịch CRON (e.g., Fri 18:00: min/max/desired=0; Mon 09:00: revert). Tiết kiệm 100% chi phí cuối tuần, kết hợp predictive scaling (mới 2023+) để dự đoán demand chính xác hơn.

📘 Tài liệu tham khảo (AWS cập nhật 2026)