Ngân hàng đề — AWS Certified Machine Learning Engineer Associate
Tìm thấy 635 câu.
Which file format will meet these requirements?
- A CSV files compressed with Snappy
- B JSON objects in JSONL format
- C JSON files compressed with gzip
- D Apache Parquet files
Xem giải thích
🧩 Giải thích chi tiết nội dung câu hỏi
Câu hỏi tập trung vào một kỹ sư Machine Learning (ML engineer) cần sử dụng dữ liệu lưu trữ trong Amazon S3 để huấn luyện mô hình ML trên Amazon SageMaker Canvas. Dữ liệu có cấu trúc phức tạp (complex structure, có thể bao gồm nested data, schema phức tạp như arrays, structs). Yêu cầu chính là chọn định dạng file giúp giảm thiểu thời gian xử lý dữ liệu (minimizes processing time).
SageMaker Canvas là công cụ no-code/low-code cho ML, hỗ trợ import dữ liệu từ S3 mà không cần code. Với dữ liệu phức tạp, định dạng phải hiệu quả về lưu trữ (compression), truy vấn nhanh (columnar scanning), và tương thích tốt với engine xử lý của AWS như Glue hoặc Athena để Canvas load nhanh chóng. Theo cập nhật AWS đến năm 2026, SageMaker Canvas ưu tiên các định dạng columnar như Parquet cho hiệu suất cao nhất với dữ liệu lớn và phức tạp.
✅ Đáp án đúng: Apache Parquet files
Lý do lựa chọn:
- Apache Parquet là định dạng columnar storage (lưu trữ theo cột), hỗ trợ hoàn hảo dữ liệu phức tạp (nested structures, schema evolution).
- Nó tối ưu hóa thời gian xử lý nhờ compression hiệu quả (Snappy, GZIP, ZSTD), predicate pushdown, và chỉ đọc cột cần thiết – giảm I/O đáng kể so với row-based formats.
- SageMaker Canvas hỗ trợ chính thức Parquet từ S3, giúp import nhanh chóng mà không cần ETL phức tạp, lý tưởng cho ML training. Theo benchmarks AWS, Parquet giảm thời gian load data lên đến 10x so với CSV/JSON cho datasets lớn.
📋 Phân tích tất cả các phương án (đúng/sai)
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 tiếng Anh. Mỗi phương án được đánh giá dựa trên khả năng xử lý dữ liệu phức tạp và thời gian processing trên SageMaker Canvas:
-
❌ CSV files compressed with Snappy
Sai vì CSV là định dạng row-oriented (dòng), chỉ hỗ trợ cấu trúc phẳng (flat data), không hiệu quả với dữ liệu phức tạp (nested). Compression Snappy giúp nén tốt nhưng vẫn yêu cầu scan toàn bộ file khi load, dẫn đến thời gian xử lý lâu (không columnar). Canvas hỗ trợ CSV nhưng kém tối ưu cho ML lớn. -
❌ JSON objects in JSONL format
Sai vì JSONL (JSON Lines) là text-based, row-oriented, phù hợp semi-structured data nhưng không columnar, schema không fixed dẫn đến parsing chậm với dữ liệu phức tạp. Không có compression built-in mạnh, tăng thời gian xử lý khi Canvas phải parse từng dòng. Canvas hỗ trợ nhưng chỉ cho small datasets. -
❌ JSON files compressed with gzip
Sai vì JSON là row-oriented, text-heavy, gzip chỉ nén tốt nhưng decompression + parsing chậm với nested structures phức tạp. Không hỗ trợ columnar query, dẫn đến thời gian load cao trên S3. Canvas hỗ trợ hạn chế JSON, không khuyến nghị cho performance. -
✅ Apache Parquet files
Đúng như đã giải thích ở trên: Columnar, hỗ trợ phức tạp schema, compression tối ưu, giảm processing time tối đa cho SageMaker Canvas.
🛠️ Lời khuyên thực hành
- Để triển khai: Upload Parquet vào S3 bucket (partitioned nếu có thể), sau đó import trực tiếp vào Canvas qua UI. Sử dụng AWS Glue Crawler để catalog schema nếu cần.
- Test performance: Với dữ liệu >1GB phức tạp, Parquet thường nhanh hơn 5-10x so với CSV/JSON.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- Amazon SageMaker Canvas Data Import Formats – Xác nhận hỗ trợ Parquet/CSV/JSONL, ưu tiên Parquet cho efficiency.
- Apache Parquet on AWS & SageMaker Processing with Parquet – Benchmarks columnar benefits.
- AWS Well-Architected ML Lens: Khuyến nghị Parquet cho S3-based ML pipelines.
Which metric finding should the ML engineer prioritize the MOST when choosing the model?
- A Low precision
- B High precision
- C Low recall
- D High recall
Xem giải thích
🧠 Phân tích câu hỏi trắc nghiệm AWS về Machine Learning (SageMaker)
🔍 Giải thích nội dung câu hỏi một cách chi tiết:
Câu hỏi mô tả tình huống một kỹ sư ML (ML engineer) đang đánh giá nhiều mô hình ML để chọn một mô hình đưa vào sản xuất (production). Điểm quan trọng nhất: Chi phí của false negative (FN) – tức là dự đoán âm tính (negative) nhưng thực tế là dương tính (positive) – cao hơn rất nhiều so với chi phí của false positive (FP) – dự đoán dương tính nhưng thực tế là âm tính.
Trong ngữ cảnh AWS (chủ yếu với Amazon SageMaker), khi đánh giá mô hình ML, các chỉ số như precision và recall rất phổ biến để đo lường hiệu suất. Câu hỏi yêu cầu ưu tiên chỉ số nào nhất (prioritize the MOST) để chọn mô hình, dựa trên sự chênh lệch chi phí này. Điều này nhấn mạnh vào việc giảm thiểu lỗi FN, vì nó đắt đỏ hơn (ví dụ: bỏ lỡ bệnh nhân thực sự bệnh trong y tế, hoặc bỏ qua giao dịch gian lận trong tài chính). Kiến thức cập nhật đến 2026: AWS SageMaker vẫn sử dụng các metrics chuẩn từ scikit-learn và tích hợp Clarify cho bias detection, nhưng core metrics như precision/recall không thay đổi (xem SageMaker Model Monitor).
✅ Đáp án đúng: High recall
Lý do lựa chọn:
Khi chi phí FN cao hơn FP, cần ưu tiên giảm FN để tránh bỏ lỡ các trường hợp positive thực tế. Recall (hay Sensitivity) = TP / (TP + FN), nên high recall nghĩa là tỷ lệ phát hiện đúng positive thực tế cao, dẫn đến FN thấp. Đây là metric ưu tiên nhất trong SageMaker khi imbalance cost như vậy (ví dụ: dùng sagemaker.metrics hoặc built-in algorithms như XGBoost). Theo best practices AWS 2025-2026, SageMaker Processing Job khuyến nghị prioritize recall cho high-stakes FN scenarios.
📊 Giải thích tất cả các phương án (đúng/sai):
-
❌ Low precision
Sai vì: Low precision = TP / (TP + FP) thấp, nghĩa là nhiều FP (dự đoán positive sai), dẫn đến chi phí FP cao – nhưng câu hỏi cho FP rẻ hơn FN, nên không ưu tiên. Thực tế, low precision làm mô hình kém hiệu quả, không phù hợp production. -
❌ High precision
Sai vì: High precision giảm FP (ít false alarm), tốt khi FP đắt đỏ (như spam detection). Nhưng ở đây FN đắt hơn, high precision có thể tăng FN (bỏ lỡ positive), vi phạm yêu cầu ưu tiên giảm FN. -
❌ Low recall
Sai vì: Low recall = TP / (TP + FN) thấp, nghĩa là nhiều FN (bỏ lỡ positive thực tế) – chính xác là lỗi đắt đỏ nhất theo câu hỏi. Low recall làm mô hình "an toàn quá mức", không phù hợp high-FN-cost scenarios. -
✅ High recall
Đúng vì: Như giải thích trên, high recall trực tiếp giảm FN bằng cách capture hầu hết positive thực tế, dù có thể tăng FP (nhưng FP rẻ). Hoàn hảo cho production SageMaker với custom metrics.
📘 Tài liệu tham khảo (cập nhật AWS 2026):
- AWS SageMaker Documentation: Evaluate Models – Metrics như recall trong BinaryClassificationMetrics.
- AWS ML Best Practices: Handling Imbalanced Data – Nhấn mạnh recall cho high FN cost.
- Scikit-learn (tích hợp SageMaker): Precision/Recall definitions (v1.5+).
🛠️ Lời khuyên DevOps: Trong pipeline CI/CD SageMaker (với AWS CodePipeline), tự động hóa evaluation job để threshold recall > 0.95 trước deploy! 🚀
Which solution will meet these requirements?
- A Use SageMaker Debugger to track the inferences and to report metrics. Create a custom rule to provide a notification when the threshold is breached.
- B Use SageMaker Debugger to track the inferences and to report metrics. Use the tensor_variance built-in rule to provide a notification when the threshold is breached.
- C Log all the endpoint invocation API events by using AWS CloudTrail. Use an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
- D Add the Invocations metric to an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi tập trung vào việc triển khai một giải pháp cho Amazon SageMaker endpoint sau khi đã train và deploy ML model. Yêu cầu chính bao gồm:
- Record (ghi log) tất cả các API call events (các sự kiện gọi API) liên quan đến endpoint này, chẳng hạn như InvokeEndpoint.
- Monitor (giám sát) các sự kiện đó.
- Notify (thông báo) khi số lượng API call events vượt ngưỡng (breach threshold) đã định trước. 🛠️ Mục tiêu cốt lõi: Cần một giải pháp toàn diện, ghi log chi tiết tất cả API calls (không chỉ metrics tổng hợp), kết hợp giám sát qua dashboard và alarm tự động. Đây là kịch bản DevOps điển hình trong SageMaker, sử dụng các dịch vụ AWS tích hợp để đảm bảo tuân thủ, audit và alerting theo best practices (cập nhật đến 2026 với SageMaker Inference Recommender và CloudTrail Lake hỗ trợ query logs nhanh hơn).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Log all the endpoint invocation API events by using AWS CloudTrail. Use an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
Lý do:
- AWS CloudTrail ghi log tất cả API calls (bao gồm InvokeEndpoint cho SageMaker endpoints) một cách chi tiết, đầy đủ (management events và data events nếu enable). Điều này đáp ứng hoàn hảo yêu cầu "record all the API call events".
- Amazon CloudWatch dashboard cho phép visualize logs/metrics từ CloudTrail.
- CloudWatch alarm trigger notification (SNS/Email) khi số lượng events vượt threshold (qua metric filters trên logs hoặc Insights queries). 🛠️ Giải pháp này scalable, serverless, chi phí tối ưu và tuân thủ AWS Well-Architected Framework (Operational Excellence pillar). Không cần code custom, chỉ config.
📋 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 nội dung gốc bằng tiếng Anh. Mỗi phương án được đánh giá ✅ (đúng) hoặc ❌ (sai), kèm giải thích rõ ràng:
-
❌ [SAI] Use SageMaker Debugger to track the inferences and to report metrics. Create a custom rule to provide a notification when the threshold is breached.
Giải thích sai: SageMaker Debugger chủ yếu dùng cho training jobs để debug tensors, gradients và metrics thời gian thực (như loss/overfitting). Nó không track API calls hoặc inference endpoint events (chỉ hỗ trợ một phần inference profiling qua Profiler). Custom rule chỉ áp dụng cho training metrics, không phù hợp record "all API call events" hay monitor endpoint invocations. Không đáp ứng yêu cầu log toàn diện. -
❌ [SAI] Use SageMaker Debugger to track the inferences and to report metrics. Use the tensor_variance built-in rule to provide a notification when the threshold is breached.
Giải thích sai: Tương tự trên, SageMaker Debugger không dành cho endpoint API monitoring. Built-in rule tensor_variance chỉ phát hiện variance trong tensors trong training phase (anomaly detection cho model quality). Nó không record API calls hay đếm events, dẫn đến thiếu log chi tiết và không monitor được threshold invocations. -
✅ [ĐÚNG] Log all the endpoint invocation API events by using AWS CloudTrail. Use an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
Giải thích đúng: Như phần trên, CloudTrail capture đầy đủ API events (data events cho InvokeEndpoint phải enable trail cho SageMaker). CloudWatch tích hợp logs để dashboard/alarm (metric filter đếm events > threshold, gửi SNS). Hoàn hảo cho audit, compliance (SOC/PCI) và real-time alerting. -
❌ [SAI] Add the Invocations metric to an Amazon CloudWatch dashboard for monitoring. Set up a CloudWatch alarm to provide notification when the threshold is breached.
Giải thích sai: Invocations metric (từ CloudWatch) chỉ là metric tổng hợp đếm số lượng invocations (rate/threshold-based), không record chi tiết all API call events (không có payload, user, IP...). Thiếu logging đầy đủ, chỉ monitor metrics cơ bản. Không đáp ứng "record" yêu cầu chính.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- AWS CloudTrail cho SageMaker: CloudTrail User Guide - Logging SageMaker API Calls (enable data events cho endpoints).
- CloudWatch + CloudTrail integration: Amazon CloudWatch Logs Insights cho CloudTrail (query API events).
- SageMaker Monitoring best practices: Amazon SageMaker Developer Guide - Monitoring Endpoints (xác nhận CloudTrail cho API logs, không phải Debugger).
- Exam DOP-C02 blueprint: AWS Certified DevOps Engineer Professional (2024-2026) – Domain 4: Automation & Monitoring. 🛠️ Lời khuyên: Trong thực tế, enable CloudTrail Lake cho query nhanh hơn và tích hợp SageMaker Model Monitor cho inference quality riêng biệt!
The company is developing pipelines in Amazon SageMaker Pipelines for ML model development. The pipelines will use the output of the AWS Glue jobs during the data processing phase of model development. An ML engineer needs to implement a solution that integrates the AWS Glue jobs with the pipelines.
Which solution will meet these requirements with the LEAST operational overhead?
- A Use AWS Step Functions for orchestration of the pipelines and the AWS Glue jobs.
- B Use processing steps in SageMaker Pipelines. Configure inputs that point to the Amazon Resource Names (ARNs) of the AWS Glue jobs.
- C Use Callback steps in SageMaker Pipelines to start the AWS Glue workflow and to stop the pipelines until the AWS Glue jobs finish running.
- D Use Amazon EventBridge to invoke the pipelines and the AWS Glue jobs in the desired order.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh việc tích hợp AWS Glue jobs (được điều phối bởi AWS Glue Workflow, có thể chạy theo lịch trình hoặc thủ công) với Amazon SageMaker Pipelines trong giai đoạn xử lý dữ liệu cho phát triển mô hình ML.
Công ty cần một giải pháp tích hợp với ít overhead vận hành nhất (LEAST operational overhead), nghĩa là ưu tiên cách đơn giản, tự động, không cần quản lý phức tạp thêm.
✅ Mục tiêu chính: SageMaker Pipelines sử dụng output từ Glue jobs một cách đồng bộ (pipeline chờ Glue hoàn thành trước khi tiếp tục).
🛠️ Bối cảnh cập nhật 2026: AWS Glue Workflow hỗ trợ callback qua Amazon EventBridge hoặc Step Functions. SageMaker Pipelines (phiên bản mới nhất) có tính năng Callback Steps (ra mắt 2021, cải tiến liên tục) để tạm dừng pipeline và chờ tín hiệu hoàn thành từ job bên ngoài như Glue, giảm thiểu custom code và quản lý state.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use Callback steps in SageMaker Pipelines to start the AWS Glue workflow and to stop the pipelines until the AWS Glue jobs finish running.
Lý do chọn 🏆:
- Callback Steps trong SageMaker Pipelines cho phép pipeline tạm dừng (pause), kích hoạt Glue Workflow qua API (như
start_workflow_run), sau đó chờ callback từ Glue (qua EventBridge hoặc SNS) khi hoàn thành. - Ít overhead nhất vì: Không cần service orchestrate bên ngoài (như Step Functions), tự động handle state/waiting trong SageMaker, hỗ trợ retry/error handling native. Glue Workflow gửi callback tự động qua integration với EventBridge.
- Phù hợp hoàn hảo cho data processing phase ML, đảm bảo thứ tự (Glue → SageMaker) và đồng bộ mà không custom logic phức tạp.
📘 Tài liệu tham khảo: - Amazon SageMaker Pipelines Callback Steps (AWS Docs 2026).
- AWS Glue Workflow Integration với EventBridge cho callback.
📋 Giải thí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 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 best practices AWS 2026.
-
❌ [SAI] Use AWS Step Functions for orchestration of the pipelines and the AWS Glue jobs.
Phương án này yêu cầu dùng Step Functions làm orchestrator trung tâm cho cả SageMaker Pipelines và Glue jobs.
Lý do sai 🚫: Overhead cao vì phải tái thiết kế toàn bộ flow (Step Functions gọi SageMaker CreatePipelineExecution + Glue StartWorkflowRun), quản lý state thủ công, error handling phức tạp, và duplicate orchestration (Glue Workflow đã có sẵn). Không "least overhead" so với native Callback Steps. -
❌ [SAI] Use processing steps in SageMaker Pipelines. Configure inputs that point to the Amazon Resource Names (ARNs) of the AWS Glue jobs.
Phương án này dùng Processing Steps trong SageMaker, chỉ định input là ARN của Glue jobs.
Lý do sai 🚫: Processing Steps chỉ dành cho SageMaker Processing Jobs (chạy trên managed endpoints), không hỗ trợ trực tiếp Glue jobs. ARN của Glue không thể dùng làm input cho Processing Step (thiếu integration native). Dẫn đến failure hoặc custom hack, tăng overhead phát triển. -
✅ [ĐÚNG] Use Callback steps in SageMaker Pipelines to start the AWS Glue workflow and to stop the pipelines until the AWS Glue jobs finish running.
Phương án này dùng Callback Steps để start Glue Workflow và pause pipeline đến khi hoàn thành.
Lý do đúng 🏆: Như đã giải thích ở trên, đây là giải pháp native, low-code của SageMaker (hỗ trợ .waitForCallback() với timeout/retry), tích hợp mượt mà với Glue qua EventBridge Callback. Đảm bảo thứ tự, sử dụng output Glue trực tiếp làm input cho bước tiếp theo. Ít overhead nhất theo AWS Well-Architected Framework (Operational Excellence pillar). -
❌ [SAI] Use Amazon EventBridge to invoke the pipelines and the AWS Glue jobs in the desired order.
Phương án này dùng EventBridge để trigger thứ tự SageMaker Pipelines và Glue jobs.
Lý do sai 🚫: EventBridge giỏi event-driven async (fire-and-forget), nhưng không handle waiting/synchronization đồng bộ (pipeline không tự pause chờ Glue). Cần thêm polling/custom state machine, tăng overhead monitoring và failure recovery. Không đảm bảo "output của Glue dùng ngay" trong data phase.
🛠️ Kết luận và best practices
Giải pháp Callback Steps là optimal cho hybrid workflow (Glue ETL + SageMaker ML), tuân thủ AWS integration patterns 2026 (favor native steps > external orchestrators). Test bằng SageMaker Studio hoặc CDK/Serverless để deploy nhanh.
📘 Tài liệu bổ sung:
- SageMaker Pipelines Best Practices.
- AWS Glue + SageMaker Integration Guide.
Nếu cần code sample hoặc lab thực hành, hãy cho tôi biết! 🚀
A data scientist needs to use some of the sensitive data from the database. An ML engineer must give the data scientist access to the data without transforming the source data and without storing anonymized data in the database.
Which solution will meet these requirements with the LEAST implementation effort?
- A Configure dynamic data masking policies to control how sensitive data is shared with the data scientist at query time.
- B Create a materialized view with masking logic on top of the database. Grant the necessary read permissions to the data scientist.
- C Unload the Amazon Redshift data to Amazon S3. Use Amazon Athena to create schema-on-read with masking logic. Share the view with the data scientist.
- D Unload the Amazon Redshift data to Amazon S3. Create an AWS Glue job to anonymize the data. Share the dataset with the data scientist.
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 cấp quyền truy cập dữ liệu nhạy cảm từ Amazon Redshift (nguồn dữ liệu duy nhất của công ty) cho một data scientist, do ML engineer thực hiện. Các yêu cầu chính bao gồm:
- Không transform (thay đổi) dữ liệu nguồn gốc trong Redshift.
- Không lưu trữ dữ liệu đã anonymized (ẩn danh) trong database.
- Tìm giải pháp với LEAST implementation effort (ít công sức triển khai nhất).
📘 Bối cảnh AWS cập nhật đến 2026: Amazon Redshift hỗ trợ các tính năng bảo mật dữ liệu tiên tiến như Dynamic Data Masking (DDM) từ năm 2023, cho phép che giấu dữ liệu nhạy cảm tại thời điểm query mà không ảnh hưởng đến dữ liệu gốc. Điều này phù hợp hoàn hảo với yêu cầu, giảm thiểu effort so với các phương pháp copy/export dữ liệu.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Configure dynamic data masking policies to control how sensitive data is shared with the data scientist at query time.
Lý do:
🛠️ Giải pháp này sử dụng Dynamic Data Masking (DDM) của Redshift – một tính năng native, chỉ cần config policy đơn giản (qua SQL commands như CREATE MASKING POLICY). Dữ liệu nhạy cảm được mask tự động tại query time (ví dụ: thay bằng XXXX hoặc null), không thay đổi dữ liệu nguồn, không lưu thêm dữ liệu anonymized trong DB. Data scientist query bình thường nhưng chỉ thấy data đã mask.
Least effort: Chỉ vài lệnh SQL, không cần ETL, export, hay tạo view/job – triển khai nhanh nhất!
Tài liệu tham khảo:
- AWS Redshift Dynamic Data Masking Docs (cập nhật 2024-2026).
- Redshift Security Best Practices.
📋 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 lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh giá dựa trên yêu cầu câu hỏi (không transform source, không lưu anonymized data, least effort).
-
Configure dynamic data masking policies to control how sensitive data is shared with the data scientist at query time.
✅ Đúng: Như đã giải thích ở trên. DDM là tính năng built-in của Redshift (RA3 nodes+), mask real-time qua policy gắn với column/user/role. Effort thấp:CREATE MASKING POLICY,ALTER TABLE ADD MASKING POLICY. Hoàn hảo match yêu cầu! -
Create a materialized view with masking logic on top of the database. Grant the necessary read permissions to the data scientist.
❌ Sai: Materialized view (MV) lưu trữ kết quả query đã compute (bao gồm masking logic), dẫn đến lưu dữ liệu anonymized trong DB – vi phạm yêu cầu "không lưu anonymized data". Ngoài ra, effort cao: Phải viết SQL phức tạp cho masking, refresh MV định kỳ (tốn tài nguyên), và vẫn có rủi ro transform gián tiếp source qua dependency. -
Unload the Amazon Redshift data to Amazon S3. Use Amazon Athena to create schema-on-read with masking logic. Share the view with the data scientist.
❌ Sai: Việc UNLOAD data ra S3 copy toàn bộ dữ liệu nhạy cảm (không mask source), tạo rủi ro bảo mật và effort cao (script UNLOAD, IAM policies S3/Athena, named query cho masking). Athena chỉ query-on-read nhưng vẫn lưu data gốc ở S3 (không phải DB, nhưng vi phạm tinh thần "không transform source" vì export full data). Không phải least effort! -
Unload the Amazon Redshift data to Amazon S3. Create an AWS Glue job to anonymize the data. Share the dataset with the data scientist.
❌ Sai: UNLOAD ra S3 rồi dùng Glue job để anonymize (transform data) – trực tiếp tạo và lưu dữ liệu anonymized (output Glue là dataset mới ở S3/Catalog), vi phạm cả hai yêu cầu chính. Effort rất cao: Phát triển Glue ETL script, triggers, catalog, sharing – phức tạp và tốn kém hơn hẳn DDM!
Kết luận 🎯: Dynamic Data Masking là giải pháp native, zero-storage overhead, least effort – lý tưởng cho DevOps Engineer trên Redshift!
The ML engineer needs to implement a solution to detect these issues and to react in predefined ways when the issues occur. The solution also must provide comprehensive real-time metrics during the training.
Which solution will meet these requirements with the LEAST operational overhead?
- A Use TensorBoard to monitor the training job. Publish the findings to an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function to consume the findings and to initiate the predefined actions.
- B Use Amazon CloudWatch default metrics to gain insights about the training job. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
- C Expand the metrics in Amazon CloudWatch to include the gradients in each training step. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
- D Use SageMaker Debugger built-in rules to monitor the training job. Configure the rules to initiate the predefined actions.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi tập trung vào một kỹ sư ML đang sử dụng training job trong Amazon SageMaker Studio để fine-tune một mô hình deep learning. Họ đã từng dùng mô hình pre-trained tương tự với dataset tương tự, và dự đoán các vấn đề phổ biến như:
- Vanishing gradient (gradient biến mất): Gradient quá nhỏ khiến mô hình không học được.
- Underutilized GPU (GPU không được sử dụng hết công suất): GPU idle hoặc không hiệu quả.
- Overfitting (quá khớp): Mô hình học thuộc lòng dữ liệu train nhưng kém trên dữ liệu mới.
Yêu cầu giải pháp phải:
- Phát hiện (detect) các vấn đề này một cách real-time (thời gian thực).
- Phản ứng tự động theo cách predefined (ví dụ: dừng training, điều chỉnh hyperparameters).
- Cung cấp comprehensive real-time metrics (metrics toàn diện thời gian thực).
- LEAST operational overhead (ít overhead vận hành nhất, tức là tự động hóa cao, không cần code/custom nhiều).
Chủ đề liên quan Amazon SageMaker, đặc biệt là monitoring training jobs. Theo tài liệu AWS cập nhật đến 2026, SageMaker hỗ trợ các công cụ như Debugger để xử lý chính xác các vấn đề ML-specific này. 📘 Tài liệu tham khảo:
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use SageMaker Debugger built-in rules to monitor the training job. Configure the rules to initiate the predefined actions.
Lý do 🛠️:
- SageMaker Debugger là công cụ built-in của SageMaker, chuyên monitor real-time metrics chi tiết cho training jobs (bao gồm tensors, gradients, weights, GPU utilization).
- Có built-in rules sẵn (predefined rules) phát hiện chính xác vanishing gradient, overfitting, underutilized GPU (ví dụ: rules như
VanishingGradient,Overfitting,GPUMemoryUtilization). - Có thể configure actions tự động: stop training, send notifications, save tensors, v.v., mà không cần code thêm.
- Least operational overhead: Hoàn toàn managed service, tích hợp native với SageMaker Studio/Training Jobs, không cần setup pipeline phức tạp. Theo AWS 2026, Debugger hỗ trợ multi-GPU/multi-instance và tích hợp SageMaker Experiments.
❌ Phân tích tất cả các phương án (đúng/sai)
-
Use TensorBoard to monitor the training job. Publish the findings to an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function to consume the findings and to initiate the predefined actions.
❌ Sai vì: TensorBoard chỉ visualize metrics (như loss/accuracy), không có built-in detection cho vanishing gradient/underutilized GPU/overfitting một cách tự động. Phải manual publish findings → SNS → Lambda, tạo overhead cao (code custom, quản lý pipeline). Không cung cấp real-time comprehensive metrics native cho SageMaker. Overhead vận hành lớn so với built-in tools. -
Use Amazon CloudWatch default metrics to gain insights about the training job. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
❌ Sai vì: CloudWatch default metrics cho SageMaker chỉ cơ bản (CPU/GPU utilization tổng quát, disk usage), không chi tiết cho vanishing gradient (cần tensor-level) hay overfitting (cần so sánh train/validation loss). Phải dùng Lambda trigger alarm, nhưng thiếu metrics ML-specific → không detect chính xác. Overhead trung bình do cần setup alarms/Lambda, không real-time toàn diện. -
Expand the metrics in Amazon CloudWatch to include the gradients in each training step. Use the metrics to invoke an AWS Lambda function to initiate the predefined actions.
❌ Sai vì: CloudWatch không hỗ trợ dễ dàng custom metrics chi tiết như gradients per training step (cần custom code exporter từ training script, tăng độ phức tạp). Overhead cao: phát triển code, deploy metrics, setup alarms/Lambda. Không phải giải pháp native cho ML training, dễ lỗi và không scale tốt cho deep learning jobs.
Tóm lại, SageMaker Debugger là lựa pháp tối ưu nhất theo best practices AWS 2026, giúp ML engineer focus vào model thay vì ops! 🚀
Which solution will meet these requirements?
- A Set up SageMaker Debugger and create a custom rule.
- B Set up blue/green deployments with all-at-once traffic shifting.
- C Set up blue/green deployments with canary traffic shifting.
- D Set up shadow testing with a shadow variant of the new model.
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Câu hỏi xoay quanh tình huống thực tế trong AWS SageMaker: Một công ty thẻ tín dụng đang chạy mô hình phát hiện gian lận (fraud detection model) trên Amazon SageMaker endpoint ở môi trường production. Họ đã phát triển phiên bản mới của mô hình và cần đánh giá hiệu suất của phiên bản này bằng dữ liệu live (dữ liệu thực tế từ production), đồng thời không ảnh hưởng đến end users (người dùng cuối đang sử dụng dịch vụ).
Yêu cầu chính là một giải pháp test model mới với traffic thực tế nhưng không can thiệp vào response trả về cho user (tức là model mới chỉ "nhận" dữ liệu để test, không ảnh hưởng kết quả production). Đây là kịch bản điển hình cho shadow testing trong SageMaker, giúp so sánh hiệu suất mà an toàn cao. 🛡️
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Set up shadow testing with a shadow variant of the new model.
Lý do:
Shadow testing (hay shadow variant) trong SageMaker cho phép gửi toàn bộ hoặc một phần traffic production đến endpoint variant mới (shadow variant) để invoke model mới song song, nhưng response từ model mới KHÔNG được gửi về client – chỉ dùng để thu thập metrics, logs và đánh giá hiệu suất (như latency, accuracy so với model cũ). Điều này hoàn hảo đáp ứng yêu cầu: sử dụng live data mà không ảnh hưởng end users. SageMaker hỗ trợ tính năng này từ các phiên bản gần đây (cập nhật đến 2026), với monitoring tự động qua CloudWatch. 📊
📋 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 lựa chọn, đánh dấu đúng/sai rõ ràng. Tôi giữ nguyên nội dung văn bản gốc bằng tiếng Anh, chỉ giải thích bằng tiếng Việt dựa trên tài liệu AWS mới nhất.
-
❌ Set up SageMaker Debugger and create a custom rule.
Sai vì: SageMaker Debugger chủ yếu dùng để debug quá trình training model (như theo dõi tensor, gradients), không phải để test inference trên endpoint production với live data. Custom rule chỉ hỗ trợ debug training, không giúp shadow test hoặc tránh ảnh hưởng users. Không phù hợp cho production endpoint testing. 🐛 -
❌ Set up blue/green deployments with all-at-once traffic shifting.
Sai vì: Blue/green deployment trong SageMaker chuyển toàn bộ traffic (100%) ngay lập tức từ blue (old) sang green (new) endpoint variant. Điều này sẽ ảnh hưởng end users nếu model mới có vấn đề, không đáp ứng yêu cầu "không ảnh hưởng production users". Phù hợp cho deployment nhanh nhưng rủi ro cao. ⚡ -
❌ Set up blue/green deployments with canary traffic shifting.
Sai vì: Canary shifting gửi dần % traffic nhỏ (ví dụ 10%) đến model mới, nhưng traffic này là real traffic ảnh hưởng users (users nhận response từ model mới). Không đảm bảo "không ảnh hưởng end users" vì một phần users sẽ dùng model mới, có thể gây lỗi nếu model chưa ổn định. Canary tốt cho rollout dần nhưng không phải shadow test. 🐦 -
✅ Set up shadow testing with a shadow variant of the new model.
Đúng vì: Như giải thích ở trên, shadow variant invoke model mới với live data nhưng bỏ qua response, chỉ lưu metrics để đánh giá (accuracy, latency). Hoàn toàn không ảnh hưởng production traffic. SageMaker hỗ trợ config shadow mode qua API (ProductionVariants với ShadowMode), tích hợp CloudWatch cho monitoring. Lý tưởng cho fraud detection cần độ chính xác cao với dữ liệu real-time. 🌑
📘 Tài liệu tham khảo (AWS Docs mới nhất 2026)
- Shadow Testing: AWS SageMaker Shadow Variants – Chi tiết config shadow mode.
- Blue/Green & Canary: SageMaker Deployment Strategies – So sánh các traffic shifting.
- Debugger: SageMaker Debugger – Chỉ dành cho training.
- Best Practices: AWS Well-Architected Framework - ML Lens (2025 update).
Giải pháp này đảm bảo DevOps best practices: safe, observable, zero-downtime testing! 🚀 Nếu cần code ví dụ Terraform/CLI, hãy hỏi thêm nhé! 😊
The ML engineers need to generate daily reports and analyze click trends over the past 3 days by using Amazon Athena. The company must retain the data for 30 days before archiving the data.
Which solution will provide the HIGHEST performance for data retrieval?
- A Keep all the time-series data without partitioning in the S3 bucket. Manually move data that is older than 30 days to separate S3 buckets.
- B Create AWS Lambda functions to copy the time-series data into separate S3 buckets. Apply S3 Lifecycle policies to archive data that is older than 30 days to S3 Glacier Flexible Retrieval.
- C Organize the time-series data into partitions by date prefix in the S3 bucket. Apply S3 Lifecycle policies to archive partitions that are older than 30 days to S3 Glacier Flexible Retrieval.
- D Put each day's time-series data into its own S3 bucket. Use S3 Lifecycle policies to archive S3 buckets that hold data that is older than 30 days to S3 Glacier Flexible Retrieval.
Xem giải thích
🧩 Phân tích chi tiết nội dung câu hỏi
Câu hỏi tập trung vào tối ưu hóa hiệu suất truy xuất dữ liệu (data retrieval) cho dữ liệu time-series (dữ liệu chuỗi thời gian) về lượt click của người dùng, lưu trữ trong Amazon S3.
📊 Công ty lưu trữ hàng triệu dòng dữ liệu thô mỗi ngày. Các kỹ sư ML sử dụng Amazon Athena để:
- Tạo báo cáo hàng ngày.
- Phân tích xu hướng click trong 3 ngày qua.
⚠️ Yêu cầu đặc biệt: Giữ dữ liệu 30 ngày trước khi lưu trữ (archive), và cần hiệu suất cao nhất (HIGHEST performance) cho truy xuất.
🛠️ Vấn đề cốt lõi: Athena là query engine serverless trên S3, hiệu suất phụ thuộc vào cách tổ chức dữ liệu (partitioning) để tránh scan toàn bộ dữ liệu lớn. Không partition sẽ chậm, tốn chi phí. Giải pháp phải kết hợp partitioning thông minh + S3 Lifecycle policies để tự động archive dữ liệu cũ (>30 ngày) sang S3 Glacier Flexible Retrieval (chi phí thấp, truy xuất linh hoạt).
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Organize the time-series data into partitions by date prefix in the S3 bucket. Apply S3 Lifecycle policies to archive partitions that are older than 30 days to S3 Glacier Flexible Retrieval.
Lý do chọn (theo best practices AWS mới nhất 2026):
🧩 Partitioning bằng date prefix (ví dụ: s3://bucket/yyyy/mm/dd/) cho phép Athena sử dụng partition pruning – chỉ scan partitions cần thiết (như 3 ngày gần nhất), giảm thời gian query từ hàng giờ xuống giây, tiết kiệm chi phí scan dữ liệu lên đến 90-99%.
🛠️ S3 Lifecycle policies tự động move partitions cũ (>30 ngày) sang Glacier Flexible Retrieval mà không cần can thiệp thủ công, giữ hot data (dữ liệu nóng) ở S3 Standard cho truy xuất nhanh.
🚀 Đây là giải pháp hiệu suất cao nhất cho Athena với time-series data, theo AWS Well-Architected Framework (Pillar: Performance Efficiency).
📋 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 bằng tiếng Anh. Mỗi phương án được đánh giá ✅ (đúng) hoặc ❌ (sai), kèm giải thích rõ ràng:
-
Keep all the time-series data without partitioning in the S3 bucket. Manually move data that is older than 30 days to separate S3 buckets.
❌ Sai hoàn toàn: Không partitioning khiến Athena phải scan toàn bộ hàng triệu rows mỗi query, dẫn đến hiệu suất kém (chậm, tốn kém). Di chuyển thủ công không tự động, dễ lỗi và không scale với dữ liệu lớn hàng ngày. -
Create AWS Lambda functions to copy the time-series data into separate S3 buckets. Apply S3 Lifecycle policies to archive data that is older than 30 days to S3 Glacier Flexible Retrieval.
❌ Sai: Lambda tạo overhead (chi phí chạy, độ trễ copy), không tận dụng partitioning nên Athena vẫn scan chậm. Copy dữ liệu tốn storage gấp đôi, không tối ưu performance cho query 3 ngày gần nhất. -
✅ Organize the time-series data into partitions by date prefix in the S3 bucket. Apply S3 Lifecycle policies to archive partitions that are older than 30 days to S3 Glacier Flexible Retrieval.
✅ Đúng – Giải pháp tối ưu nhất: Partition date prefix kích hoạt partition pruning của Athena, query siêu nhanh cho dữ liệu gần (daily/3 days). Lifecycle policies tự động archive toàn bộ partition cũ, giữ bucket sạch sẽ và hiệu suất cao. -
Put each day's time-series data into its own S3 bucket. Use S3 Lifecycle policies to archive S3 buckets that hold data that is older than 30 days to S3 Glacier Flexible Retrieval.
❌ Sai: Tạo bucket riêng mỗi ngày (hàng trăm bucket/năm) vi phạm S3 best practices (giới hạn 1000 buckets/account mặc định, khó quản lý). Athena không prune hiệu quả bằng prefix partitioning trong một bucket, dẫn đến performance thấp hơn và chi phí quản lý cao.
📘 Tài liệu tham khảo (cập nhật AWS 2026)
- Amazon Athena Best Practices: docs.aws.amazon.com/athena/latest/ug/partitions.html – Nhấn mạnh partitioning bằng date prefix cho time-series.
- S3 Lifecycle Policies: docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html – Hỗ trợ archive partitions sang Glacier Flexible Retrieval (Standard/Massive, retrieval 1-5 phút).
- AWS Well-Architected Framework – Performance Pillar: aws.amazon.com/architecture/well-architected – Khuyến nghị partitioning cho query engine như Athena.
- S3 Glacier Flexible Retrieval (2026 update): Hỗ trợ nhanh hơn với Expedited retrieval cho ML workloads.
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 Glue Crawler để partition, hãy hỏi nhé!
An ML engineer needs to implement a solution to improve the inference performance. The solution also must provide a notification when a deviation in model quality occurs.
Which solution will meet these requirements?
- A Use SageMaker real-time inference for inference. Use SageMaker Model Monitor for notifications about model quality.
- B Use SageMaker batch transform for inference. Use SageMaker Model Monitor for notifications about model quality.
- C Use SageMaker Serverless Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
- D Keep using SageMaker Asynchronous Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
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 đã triển khai mô hình ML (Machine Learning) để phát hiện giao dịch thẻ tín dụng gian lận thời gian thực (real-time) trong ứng dụng ngân hàng. Mô hình sử dụng Amazon SageMaker Asynchronous Inference (suy luận bất đồng bộ), nhưng người dùng báo cáo trì hoãn (delays) trong việc nhận kết quả suy luận.
Nhiệm vụ của kỹ sư ML là triển khai giải pháp:
- Cải thiện hiệu suất suy luận (inference performance): Giảm độ trễ cho ứng dụng real-time.
- Gửi thông báo khi có sự lệch lạc về chất lượng mô hình (deviation in model quality), như model drift hoặc bias.
Vấn đề cốt lõi 📈:
- Asynchronous Inference phù hợp cho payload lớn (>6MB) hoặc workload không cần low-latency, vì nó queue request và xử lý bất đồng bộ → dễ gây delay nếu queue dài, không lý tưởng cho real-time fraud detection (cần phản hồi nhanh chóng, thường <1 giây).
- Cần chuyển sang phương pháp low-latency hơn và tích hợp monitoring chất lượng mô hình.
Dựa trên kiến thức AWS SageMaker mới nhất (2024-2026), SageMaker hỗ trợ nhiều loại inference: Real-time (low-latency hosted endpoints), Serverless (auto-scale, pay-per-use), Async (queue-based), Batch Transform (offline). Model Monitor là công cụ chuẩn cho quality monitoring.
✅ Đáp án đúng và lý do lựa chọn
Đáp án đúng: Use SageMaker real-time inference for inference. Use SageMaker Model Monitor for notifications about model quality.
Lý do 🛠️:
- Real-time inference là lựa chọn tối ưu cho ứng dụng real-time như fraud detection, cung cấp hosted endpoints với độ trễ thấp (milliseconds), auto-scaling, và xử lý synchronous → trực tiếp giải quyết vấn đề delays từ Async Inference.
- SageMaker Model Monitor chuyên giám sát chất lượng mô hình thời gian thực (real-time/batch), phát hiện model quality deviation (data drift, model drift, bias, accuracy), và gửi thông báo qua Amazon CloudWatch Alarms + SNS → hoàn hảo cho yêu cầu thứ hai.
- Giải pháp cân bằng chi phí, hiệu suất, không cần thay đổi lớn kiến trúc.
🔍 Giải thích tất cả các phương án (Đúng/Sai)
-
✅ Use SageMaker real-time inference for inference. Use SageMaker Model Monitor for notifications about model quality.
Đúng hoàn toàn 🏆: Như phân tích trên, real-time inference khắc phục delays cho real-time apps, Model Monitor là tool chuẩn cho quality notifications (hỗ trợ baselines, scheduling, CloudWatch integration). Phù hợp best practices AWS 2026. -
❌ Use SageMaker batch transform for inference. Use SageMaker Model Monitor for notifications about model quality.
Sai 🚫: Batch Transform chỉ dùng cho xử lý hàng loạt offline (input/output S3), không hỗ trợ real-time inference → không giảm delays, vẫn gây trễ lớn hơn Async. Phần Model Monitor đúng nhưng tổng thể không đáp ứng yêu cầu performance. -
❌ Use SageMaker Serverless Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
Sai ⚠️: Serverless Inference (ra mắt 2022, cập nhật 2026) hỗ trợ low-latency real-time cho sporadic traffic, có thể cải thiện performance, nhưng Inference Recommender chỉ recommend instance types/hardware tối ưu (benchmarking), không monitor quality deviation hay gửi notifications → thiếu phần thứ hai. -
❌ Keep using SageMaker Asynchronous Inference for inference. Use SageMaker Inference Recommender for notifications about model quality.
Sai 🔄: Giữ Async Inference không giải quyết delays (vẫn queue-based, phù hợp payload lớn chứ không real-time). Inference Recommender không dùng cho quality monitoring → chỉ optimize hardware, không detect drift/bias.
📘 Tài liệu tham khảo (AWS chính thức, cập nhật 2024-2026)
- Amazon SageMaker Inference Types – Chi tiết real-time vs. async vs. serverless.
- SageMaker Model Monitor – Monitoring drift/quality với notifications.
- SageMaker Inference Recommender – Chỉ benchmarking, không monitor.
- AWS Well-Architected Framework: ML Lens (2024) – Khuyến nghị real-time inference cho fraud detection low-latency.
Giải pháp này đảm bảo high availability, scalability và tuân thủ DevOps best practices! 🚀
The ML engineer needs a scalable solution that minimizes costs when the model is not in use. The solution also must maintain the model's capacity to respond to requests during times of peak usage.
Which solution will meet these requirements?
- A Create AWS Lambda functions that have fixed concurrency to host the model. Configure the Lambda functions to automatically scale based on the number of requests to the model.
- B Deploy the model on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. Set a static number of tasks to handle requests during times of peak usage.
- C Deploy the model to an Amazon SageMaker endpoint. Deploy multiple copies of the model to the endpoint. Create an Application Load Balancer to route traffic between the different copies of the model at the endpoint.
- D Deploy the model to an Amazon SageMaker endpoint. Create SageMaker endpoint auto scaling policies that are based on Amazon CloudWatch metrics to adjust the number of instances dynamically.
Xem giải thích
🧩 Giải thích nội dung câu hỏi
Câu hỏi tập trung vào việc triển khai giải pháp host một mô hình ML đã được train trên AWS, với các yêu cầu chính:
- Traffic requests không đều suốt ngày (thấp khi idle, cao lúc peak).
- Scalable: Tự động mở rộng để xử lý peak usage.
- Minimize costs: Giảm chi phí khi model không được sử dụng (scale down hoặc tắt instances khi idle).
- Maintain capacity: Đảm bảo phản hồi nhanh và ổn định lúc cao điểm.
🛠️ Giải pháp lý tưởng phải tận dụng dịch vụ AWS hỗ trợ ML inference tự động scale dựa trên metrics, đặc biệt là Amazon SageMaker – dịch vụ managed cho end-to-end ML workflows, với tính năng endpoint auto scaling dựa trên CloudWatch (cập nhật mới nhất AWS 2024-2026 hỗ trợ serverless inference và dynamic scaling chính xác hơn).
📘 Tài liệu tham khảo:
- Amazon SageMaker Endpoints - Automatic Scaling (AWS Docs, cập nhật 2025).
- SageMaker Serverless Inference (AWS ML Blog, 2024+).
✅ Đáp án đúng và lý do lựa chọn
Deploy the model to an Amazon SageMaker endpoint. Create SageMaker endpoint auto scaling policies that are based on Amazon CloudWatch metrics to adjust the number of instances dynamically.
Lý do chọn đáp án này 🏆:
- SageMaker endpoints là giải pháp managed, optimized cho ML inference, hỗ trợ auto scaling chính xác dựa trên CloudWatch metrics (như invocations per instance, CPU/GPU utilization).
- Scalable động: Tăng instances lúc peak, scale down to minimum (thậm chí 0 với Serverless Inference) khi idle → minimize costs tối ưu (chỉ trả cho compute thực tế).
- Maintain capacity: Latency thấp, high availability với multi-AZ, không cần quản lý infra. Phù hợp traffic inconsistent, cập nhật AWS 2026 vẫn là best practice cho ML hosting.
🔍 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 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 câu hỏi.
-
Create AWS Lambda functions that have fixed concurrency to host the model. Configure the Lambda functions to automatically scale based on the number of requests to the model.
❌ Sai: Lambda phù hợp serverless nhỏ, nhưng không lý tưởng cho ML models lớn (cold starts dài >15s, timeout 15p, memory limit 10GB). Fixed concurrency không dynamic scale tốt cho peak ML inference; tốn kém provisioned concurrency và không optimize costs khi idle (vẫn charge invocation overhead). Không phải best practice AWS cho ML hosting. -
Deploy the model on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. Set a static number of tasks to handle requests during times of peak usage.
❌ Sai: ECS Fargate serverless containers tốt, nhưng static tasks chỉ cover peak → over-provisioned, tốn kém cao khi idle (vẫn charge full tasks chạy 24/7). Không auto scale động dựa trên traffic thực tế, phải manual config ASG phức tạp, không minimize costs và kém efficient so với SageMaker managed. -
Deploy the model to an Amazon SageMaker endpoint. Deploy multiple copies of the model to the endpoint. Create an Application Load Balancer to route traffic between the different copies of the model at the endpoint.
❌ Sai: SageMaker endpoint hỗ trợ multi-instance, nhưng multiple copies + ALB thừa thãi và phức tạp (SageMaker đã built-in load balancing/load distribution). Không auto scale động, phải fixed copies → không minimize costs khi idle, tốn kém hơn auto scaling policy. AWS recommend dùng native auto scaling thay vì ALB custom. -
Deploy the model to an Amazon SageMaker endpoint. Create SageMaker endpoint auto scaling policies that are based on Amazon CloudWatch metrics to adjust the number of instances dynamically.
✅ Đúng: Như đã giải thích ở phần đáp án đúng. Giải pháp hoàn hảo match tất cả yêu cầu: scalable, cost-effective, peak-ready với metrics-driven scaling (CPU, memory, invocations).
🧠 Kết luận: SageMaker endpoint với auto scaling là gold standard cho ML inference biến động trên AWS (DevOps Pro cert DOP-C02 xác nhận). Tránh các giải pháp generic như Lambda/ECS vì kém optimize cho ML workloads! 🚀