Amazon SageMaker AI

The managed place to build, train and deploy your own model. Every step of that — a notebook to explore in, a fleet to train on, a fleet to serve from — is a server you would otherwise provision, babysit and forget to turn off. SageMaker rents you each one for exactly as long as the step lasts.

Nơi được quản lý sẵn để xây, huấn luyện và triển khai mô hình của chính bạn. Mỗi bước trong đó — một notebook để mò mẫm, một cụm máy để train, một cụm máy để phục vụ dự đoán — đều là server mà nếu không có nó bạn phải tự dựng, tự trông và thường quên tắt. SageMaker cho thuê từng cái đúng bằng thời gian bước đó chạy.

Reach for it / not the right toolKhi nào dùng / khi nào không

Reach for SageMakerChọn SageMaker

  • The prediction depends on your own history — churn, fraud, demand, remaining useful life. Nobody else's model has seen your data.Dự đoán phụ thuộc vào lịch sử của chính bạn — churn, gian lận, nhu cầu, tuổi thọ còn lại của thiết bị. Không mô hình của ai khác từng thấy dữ liệu của bạn.
  • A data science team already has notebooks and a framework (XGBoost, PyTorch, TensorFlow) and needs somewhere to run them without owning EC2.Đội data science đã có sẵn notebook và framework (XGBoost, PyTorch, TensorFlow) và cần chỗ chạy mà không phải tự nuôi EC2.
  • Training is bursty — hours of GPU once a week. Ephemeral training jobs beat a cluster that idles the other six days.Việc train diễn ra theo đợt — vài giờ GPU mỗi tuần. Training job tạm thời tốt hơn một cụm máy nằm không sáu ngày còn lại.
  • The model must be retrained on a schedule and promoted like software — that's Pipelines plus a model registry.Mô hình phải được train lại định kỳ và thăng cấp như phần mềm — đó là Pipelines cộng model registry.
  • Someone asks "is the model still right?" months after launch — Model Monitor exists for exactly that.Ai đó hỏi "mô hình còn đúng không?" nhiều tháng sau khi lên production — Model Monitor sinh ra đúng cho việc đó.

Not the right toolKhông phải chỗ dùng

  • The task is generic — read text from a scan, detect a face, translate, transcribe. Use the AI services; there is nothing to train.Bài toán phổ thông — đọc chữ từ ảnh scan, nhận diện khuôn mặt, dịch, gỡ băng. Dùng AI services; chẳng có gì để train cả.
  • You want a chatbot or a summariser on top of an existing foundation model → Bedrock, not a training job.Bạn muốn một chatbot hay bộ tóm tắt dựa trên foundation model có sẵn → Bedrock, không phải training job.
  • It's really an SQL aggregation dressed up as prediction. Try Athena or Redshift first — most "ML requests" die there, cheaply.Thực ra chỉ là một phép gộp SQL khoác áo dự đoán. Thử Athena hoặc Redshift trước — phần lớn "yêu cầu ML" chết ở đó, và rẻ.
  • You have no labelled data at all and no way to get it. Train on what, exactly? Fix the data problem before renting GPUs.Bạn không có dữ liệu đã gán nhãn và cũng không cách nào có. Vậy train trên cái gì? Sửa vấn đề dữ liệu trước khi đi thuê GPU.
  • Plain distributed batch compute with no model in it — that's AWS Batch or EMR.Chỉ là tính toán batch phân tán không có mô hình nào — đó là AWS Batch hoặc EMR.

The loop, and what is a server at each stepVòng lặp, và chỗ nào là server

Read it as an infrastructure diagram, not a maths one. Left half is compute that exists for minutes; right half is compute that may exist forever. That split is where the bill lives, and where the exam questions live too. Hãy đọc nó như sơ đồ hạ tầng, đừng đọc như sơ đồ toán. Nửa trái là compute chỉ tồn tại vài phút; nửa phải là compute có thể tồn tại mãi mãi. Ranh giới đó là nơi hoá đơn nằm, và cũng là nơi câu hỏi thi nằm.

The SageMaker lifecycle. Historical data sits in S3 with the answer missing. Labelling attaches the known answer to every row. A training job is ephemeral compute that SageMaker provisions, runs and tears down, reading from S3 and writing a model artifact back to S3. Tuning re-runs the training job with different hyperparameters until the metric stops improving. The trained artifact is then deployed to exactly one of four inference options: a real-time endpoint that is always on, serverless inference that scales to zero, asynchronous inference that queues large payloads, or batch transform that scores a whole dataset with no endpoint at all. All four produce a prediction on new, unlabelled data. 1 · TRAIN — ephemeral, you pay only for the job S3 · DATA historical rows features you have answer not attached label LABELLED attach the known answer to each row Ground Truth helps train TRAINING JOB SageMaker spins up instances, runs and tears them down tune TUNE hyperparameters — the knobs you set, not the ones learnt save MODEL FILE tar.gz back in S3 nothing is serving it yet re-run until the metric stops improving 2 · DEPLOY — pick exactly one deploy REAL-TIME always-on instances single-digit ms billed per hour, 24/7 steady, latency-critical SERVERLESS scales to zero cold start on wake billed per request spiky or idle traffic ASYNCHRONOUS queue in, S3 out payloads up to 1 GB minutes per request big or slow inputs BATCH TRANSFORM no endpoint at all reads S3, writes S3 job runs then exits score a whole dataset same trained model behind all four new, unlabelled rows go in prediction on new data "pass with 906"

The worked example that makes it stick: historical rows are years of IT experience, years on AWS, hours spent studying; the label is the score that person actually got. Train on that, and the model predicts a score for someone who hasn't sat the exam yet.

Ví dụ dễ nhớ: mỗi dòng dữ liệu cũ gồm số năm làm IT, số năm dùng AWS, số giờ đã học; nhãn là điểm người đó thực sự đạt. Train trên đó, rồi mô hình dự đoán điểm cho một người còn chưa đi thi.

The infra takeawayĐiều đọng lại về hạ tầng Training instances and inference instances are separate fleets with separate bills. A finished training job costs nothing afterwards; a forgotten real-time endpoint bills every hour until someone deletes it. That asymmetry is the single most common SageMaker surprise on a cost review. Instance để train và instance để suy luận là hai cụm riêng, hai khoản tiền riêng. Training job xong thì không tốn gì nữa; còn một real-time endpoint bị bỏ quên vẫn tính tiền từng giờ đến khi có người xoá. Sự bất đối xứng đó là bất ngờ hay gặp nhất khi soát chi phí SageMaker.

Which inference option — the decisionChọn kiểu inference nào — quyết định

Ask two questions in order: does a human wait for this answer right now? and how big / how slow is one request? Those two answers pick the option without any ML knowledge at all. Hỏi hai câu theo thứ tự: có ai đang đợi câu trả lời ngay lúc này không? và một request nặng cỡ nào, chậm cỡ nào? Hai câu đó chọn ra phương án mà chẳng cần biết gì về ML.

OptionPhương án What it actually isThực chất là gì Pick it whenChọn khi The catchĐánh đổi
Real-time endpointReal-time endpoint An HTTPS endpoint on instances that are always running, behind autoscaling you configure.Một endpoint HTTPS chạy trên instance luôn bật, có autoscaling do bạn cấu hình. A user or a service is blocked waiting — checkout fraud scoring, a recommendation on page load. Steady, predictable traffic.Một người dùng hoặc service đang đứng chờ — chấm điểm gian lận lúc thanh toán, gợi ý khi tải trang. Traffic đều và dự đoán được. Billed per instance-hour whether or not anyone calls it. Payload and timeout are small (seconds).Tính tiền theo giờ instance dù có ai gọi hay không. Payload nhỏ và timeout ngắn (vài giây).
Serverless InferenceServerless Inference Same endpoint shape, but SageMaker runs the capacity and scales it to zero between requests.Vẫn là endpoint như vậy, nhưng SageMaker tự lo capacity và co về không giữa các request. Traffic is spiky or mostly idle — an internal tool, a low-volume API — and a first-call delay is acceptable.Traffic giật cục hoặc phần lớn thời gian rảnh — công cụ nội bộ, API ít lượt — và chấp nhận được độ trễ ở lần gọi đầu. Cold starts. No GPU option. If the latency SLA is strict, this is the wrong answer.Cold start. Không có tuỳ chọn GPU. Nếu SLA về độ trễ ngặt nghèo thì đây là đáp án sai.
Asynchronous InferenceAsynchronous Inference You submit a request, SageMaker queues it, writes the result to S3 and notifies you. Large payloads, long runtimes.Bạn gửi request, SageMaker xếp hàng đợi, ghi kết quả ra S3 rồi báo cho bạn. Payload lớn, chạy lâu. One request is big (up to ~1 GB) or slow (up to ~1 hour) — a whole video, a scan, a genome. Nobody is staring at a spinner.Mỗi request nặng (tới ~1 GB) hoặc chậm (tới ~1 giờ) — cả một video, một bản scan, một bộ gen. Không ai ngồi nhìn vòng xoay chờ. Answers are not immediate, and the caller has to handle a callback or poll S3. Can also scale to zero when the queue empties.Kết quả không tức thì, phía gọi phải xử lý callback hoặc tự poll S3. Cũng có thể co về không khi hàng đợi rỗng.
Batch TransformBatch Transform A job, not an endpoint. Reads a whole dataset from S3, scores every row, writes results back to S3, exits.Là một job, không phải endpoint. Đọc cả tập dữ liệu từ S3, chấm mọi dòng, ghi kết quả về S3, rồi kết thúc. Predictions are consumed on a schedule — nightly churn scores for every customer, a monthly demand forecast.Dự đoán được dùng theo lịch — điểm churn hằng đêm cho mọi khách hàng, dự báo nhu cầu hằng tháng. No online path at all. If anything needs an answer between runs, you need one of the endpoints too.Hoàn toàn không có đường online. Nếu có thứ gì cần trả lời giữa hai lần chạy, bạn vẫn phải dựng thêm endpoint.
Cheapest correct answerĐáp án đúng mà rẻ nhất When a question stresses "infrequent", "unpredictable", "minimise cost when idle" — it is steering you off the real-time endpoint and onto serverless or async, because those are the two that scale to zero. When it stresses "all records" or "once a night", it wants batch transform and no endpoint at all. Khi đề nhấn "thỉnh thoảng", "không đoán được", "giảm chi phí lúc rảnh" — nó đang đẩy bạn rời khỏi real-time endpoint sang serverless hoặc async, vì đó là hai thứ co được về không. Khi đề nhấn "toàn bộ bản ghi" hoặc "mỗi đêm một lần", nó muốn batch transform và không cần endpoint nào cả.

The satellites worth namingNhững vệ tinh đáng nhớ tên

Dozens of sub-features share the SageMaker name. These are the ones a question can hinge on — you only need to recognise which step of the loop each one attaches to. Có hàng chục tính năng con mang tên SageMaker. Đây là những cái mà một câu hỏi có thể xoay quanh — bạn chỉ cần nhận ra mỗi cái gắn vào bước nào của vòng lặp.

Studio · NotebooksStudio · Notebooks The browser IDE for the whole lifecycle, plus managed Jupyter notebook instances. This is the "one place" part of the pitch — explore, launch a training job, deploy, all without leaving it.IDE chạy trên trình duyệt cho cả vòng đời, kèm notebook Jupyter được quản lý sẵn. Đây là phần "một chỗ làm hết" — khám phá dữ liệu, phóng training job, deploy, không phải rời đi đâu.
Ground TruthGround Truth Labelling as a managed workflow — your own staff, a vendor, or Mechanical Turk. The keyword is human labelling at scale; it also learns from the humans to auto-label the easy cases.Gán nhãn dưới dạng workflow được quản lý — nhân sự của bạn, nhà cung cấp, hoặc Mechanical Turk. Từ khoá là gán nhãn bằng người ở quy mô lớn; nó còn học từ người để tự gán các trường hợp dễ.
Feature StoreFeature Store One store for the computed inputs a model eats, shared between training and serving. Its whole reason to exist: stop training and production computing the same feature differently.Một kho chung cho các đặc trưng đã tính mà mô hình dùng, dùng chung giữa lúc train và lúc phục vụ. Lý do tồn tại duy nhất: chặn việc train và production tính cùng một đặc trưng theo hai kiểu khác nhau.
Model MonitorModel Monitor Watches a live endpoint and alarms on drift — the incoming data has quietly stopped looking like the training data, so accuracy rots without anything erroring. Reports go to CloudWatch.Theo dõi endpoint đang chạy và báo động khi có drift — dữ liệu vào dần dần không còn giống dữ liệu lúc train, nên độ chính xác mục ruỗng mà chẳng có lỗi nào nổ ra. Báo cáo đẩy sang CloudWatch.
PipelinesPipelines CI/CD for models: prepare → train → evaluate → register → deploy, as a repeatable, versioned graph. The answer whenever a question says "automate retraining" or "reproducible ML workflow".CI/CD cho mô hình: chuẩn bị → train → đánh giá → đăng ký → deploy, thành một đồ thị lặp lại được và có phiên bản. Là đáp án mỗi khi đề nói "tự động train lại" hay "quy trình ML tái lập được".
Autopilot · AutoMLAutopilot · AutoML Point it at a labelled table, say which column is the answer, and it tries algorithms and hyperparameters for you. Keyword: little to no ML expertise on the team — and it still shows you the notebooks it generated.Chỉ nó vào một bảng đã gán nhãn, nói cột nào là đáp án, rồi nó tự thử thuật toán và hyperparameter giúp bạn. Từ khoá: đội gần như không có chuyên môn ML — và nó vẫn đưa lại notebook nó đã sinh ra.
JumpStartJumpStart A catalogue of prebuilt models and solution templates you deploy or fine-tune instead of starting from nothing. Keyword: get something working fast.Một catalog gồm mô hình dựng sẵn và mẫu giải pháp để deploy hoặc fine-tune thay vì bắt đầu từ con số không. Từ khoá: có thứ chạy được thật nhanh.
ClarifyClarify Bias detection and explainability — which features drove this prediction, and is the model treating some group differently. Keyword: fairness, transparency, regulator.Phát hiện thiên lệch và giải thích mô hình — đặc trưng nào dẫn tới dự đoán này, và mô hình có đối xử khác với nhóm nào không. Từ khoá: công bằng, minh bạch, cơ quan quản lý.
Committing to spendCam kết chi tiêu There is a dedicated SageMaker Savings Plan — a 1- or 3-year commitment to an hourly spend across notebook, training, processing and inference instances, in exchange for a lower rate. It is separate from Compute Savings Plans and does not cover EC2 or Lambda; see Savings Plans · RIs. Only worth it once the endpoint fleet is genuinely steady. Có riêng SageMaker Savings Plan — cam kết 1 hoặc 3 năm cho một mức chi theo giờ trải khắp instance notebook, training, processing và inference, đổi lại giá rẻ hơn. Nó tách biệt với Compute Savings Plans và không bao EC2 hay Lambda; xem Savings Plans · RIs. Chỉ đáng mua khi cụm endpoint đã thực sự ổn định.

The boundary: SageMaker vs AI services vs BedrockRanh giới: SageMaker, AI services và Bedrock

This is the distinction the exam actually tests, and it has nothing to do with algorithms. It is only ever: whose model is it, and who trains it? Đây mới là điểm đề thi thực sự kiểm tra, và nó chẳng liên quan gì tới thuật toán. Luôn chỉ là: mô hình của ai, và ai train nó?

SageMaker AI AI servicesAI services Bedrock
Whose modelMô hình của ai Yours — you build and train it on your dataCủa bạn — bạn tự xây và train trên dữ liệu của mình AWS's, pre-trained, invisible to youCủa AWS, train sẵn, bạn không nhìn thấy A foundation model from AWS or a partner, served behind an APIMột foundation model của AWS hoặc đối tác, phục vụ sau một API
What you doBạn làm gì Label, train, tune, deploy, monitorGán nhãn, train, tune, deploy, giám sát Call an API. That's it — DetectLabels, DetectDocumentTextGọi API. Chỉ vậy — DetectLabels, DetectDocumentText Prompt it; optionally fine-tune or ground it on your documentsRa prompt cho nó; tuỳ chọn fine-tune hoặc gắn thêm tài liệu của bạn
Typical examplesVí dụ điển hình Churn, fraud scoring, demand forecast, predictive maintenanceChurn, chấm điểm gian lận, dự báo nhu cầu, bảo trì dự đoán Rekognition, Comprehend, Textract, Transcribe, Translate, PollyRekognition, Comprehend, Textract, Transcribe, Translate, Polly Chat assistants, summarisation, generation, embeddingsTrợ lý hội thoại, tóm tắt, sinh nội dung, embedding
What you pay forTrả tiền cho cái gì Instances — training jobs and whatever is hosting the modelInstance — training job và bất cứ thứ gì đang host mô hình Per API call / per unit processed. No infrastructure at allTheo lượt gọi API / theo đơn vị xử lý. Không có hạ tầng nào cả Per token, or provisioned throughput if you need guaranteesTheo token, hoặc provisioned throughput nếu cần cam kết
Effort / expertiseCông sức / chuyên môn Highest — needs data, labels and someone who knows what to do with themCao nhất — cần dữ liệu, nhãn, và người biết phải làm gì với chúng Lowest — a developer with an SDK and an afternoonThấp nhất — một dev với SDK và một buổi chiều Low, until you start grounding it on private dataThấp, cho tới khi bạn bắt đầu gắn nó với dữ liệu nội bộ
The trapCái bẫy A question describes something a pre-trained service already does — "extract fields from scanned invoices", "flag negative reviews" — and then offers a SageMaker option full of impressive words. It is wrong: it means building, labelling and hosting a model to solve a problem an existing API solves in one call. Least operational overhead wins. Đề mô tả đúng thứ mà một service train sẵn đã làm được — "trích xuất trường từ hoá đơn scan", "đánh dấu đánh giá tiêu cực" — rồi đưa ra một phương án SageMaker nghe rất kêu. Nó sai: nghĩa là đi xây, gán nhãn và host cả một mô hình cho bài toán mà một API có sẵn giải trong một lần gọi. Ít gánh nặng vận hành nhất mới thắng.

Things that catch you outNhững chỗ dễ vấp

  • The endpoint is the money. A real-time endpoint is an always-on instance fleet; deleting the model or the notebook does not delete it. Idle endpoints from an old experiment are the classic line item nobody can explain. Tiền nằm ở endpoint. Real-time endpoint là một cụm instance luôn bật; xoá model hay xoá notebook không xoá nó. Endpoint bỏ không từ một thí nghiệm cũ là dòng chi phí kinh điển mà không ai giải thích nổi.
  • Notebook instances run until you stop them. They are EC2 with a nicer face, billed by the hour, and they do not stop themselves when the browser tab closes. A lifecycle configuration that shuts idle ones down is the standard fix. Notebook instance chạy tới khi bạn tự tắt. Chúng là EC2 khoác bộ mặt dễ chịu hơn, tính tiền theo giờ, và không tự dừng khi bạn đóng tab trình duyệt. Cách chữa chuẩn là một lifecycle configuration tự tắt những cái đang rảnh.
  • Drift is silent. The endpoint stays healthy, latency stays flat, CloudWatch is green — and the predictions have been quietly wrong for a month because the world moved. Nothing catches this except Model Monitor plus a retraining pipeline. Drift diễn ra âm thầm. Endpoint vẫn healthy, độ trễ vẫn phẳng, CloudWatch vẫn xanh — trong khi dự đoán đã sai suốt một tháng vì thực tế đã đổi. Không gì bắt được điều này ngoài Model Monitor cộng một pipeline train lại.
  • Training data lives in S3, so S3 is your security boundary. Encryption with KMS, bucket policy, and a VPC-attached job with a gateway endpoint if the data must never touch the internet — that last one is the usual "sensitive data" answer. Dữ liệu train nằm ở S3, nên S3 chính là ranh giới bảo mật. Mã hoá bằng KMS, bucket policy, và job gắn vào VPC kèm gateway endpoint nếu dữ liệu tuyệt đối không được ra internet — cái cuối là đáp án quen thuộc cho tình huống "dữ liệu nhạy cảm".
  • Batch Transform is not "async inference for big files". Async takes one request at a time and returns a result per request; batch takes one dataset and returns a file. If the wording says "for each incoming document", it's async, not batch. Batch Transform không phải là "async inference cho file lớn". Async nhận từng request một và trả về kết quả cho từng request; batch nhận cả một tập dữ liệu và trả về một file. Nếu đề viết "với mỗi tài liệu gửi đến", đó là async chứ không phải batch.
  • Spot for training, never for the endpoint. Managed spot training can cut training cost sharply because a job can checkpoint and resume; a serving endpoint has no equivalent, so that saving simply does not exist on the inference side. Spot cho training, tuyệt đối không cho endpoint. Managed spot training có thể cắt mạnh chi phí train vì job biết checkpoint rồi chạy tiếp; endpoint phục vụ không có cơ chế tương đương, nên khoản tiết kiệm đó đơn giản là không tồn tại ở phía inference.

Exam reflexesPhản xạ khi thi

The question says…Đề nói… AnswerTrả lời
"Build a custom model on our own historical data, minimal infrastructure management""Xây mô hình riêng trên dữ liệu lịch sử của chúng tôi, quản lý hạ tầng ít nhất" SageMaker — training jobs + a managed endpointSageMaker — training job + endpoint được quản lý
"Predictions for every customer, once a night, results into S3""Dự đoán cho mọi khách hàng, mỗi đêm một lần, kết quả đổ vào S3" Batch Transform — no endpoint to run or pay forBatch Transform — không phải chạy hay trả tiền cho endpoint nào
"Traffic is intermittent and unpredictable; pay nothing when idle; occasional latency is fine""Traffic rời rạc và khó đoán; lúc rảnh không mất tiền; thỉnh thoảng chậm một chút cũng được" Serverless Inference — scales to zero, accept cold startsServerless Inference — co về không, đổi lại chịu cold start
"Each request is a 500 MB file taking several minutes to process""Mỗi request là một file 500 MB mất vài phút để xử lý" Asynchronous Inference — queued, large payload, result to S3Asynchronous Inference — xếp hàng, payload lớn, kết quả ra S3
"Accuracy has degraded months after launch and nobody noticed""Độ chính xác đã tụt sau vài tháng chạy mà không ai nhận ra" Model Monitor for drift + Pipelines to retrainModel Monitor để bắt drift + Pipelines để train lại
"Detect objects in images / extract text from PDFs, least effort""Nhận diện vật thể trong ảnh / trích xuất chữ từ PDF, ít công nhất" Not SageMaker — AI services. Generative text? BedrockKhông phải SageMaker — AI services. Sinh văn bản? Bedrock