SageMaker's End-to-End ML Lifecycle Model
Amazon SageMaker AI is not one API. It is a set of loosely coupled job types that each read from and write to Amazon S3, chained together by your pipeline rather than baked into a single call.
Busca en todas las páginas de la documentación
Amazon SageMaker AI is not one API. It is a set of loosely coupled job types that each read from and write to Amazon S3, chained together by your pipeline rather than baked into a single call.
This page gives you the map before the rest of this section zooms into one stage: training. Once you can place training and tuning correctly between data prep and deployment, the individual API calls in later pages read as steps in a sequence instead of an unrelated pile of operations.
Think of a machine learning project as data flowing through a pipe with five valves: prepare, train, tune, deploy, monitor. SageMaker gives each valve its own AWS resource type, and S3 is the connective tissue between them.
Data preparation happens through SageMaker Processing jobs (CreateProcessingJob) or simply your own scripts, and it produces cleaned, split training and validation data written to S3 as CSV, Parquet, RecordIO, or another format the algorithm expects.
Training is this section's focus. A training job (CreateTrainingJob) reads that S3 data, runs a container that fits a model, and writes a model artifact - typically a model.tar.gz - back to S3. The job does not serve predictions; it only produces the artifact.
Tuning is training's sibling: a hyperparameter tuning job (CreateHyperParameterTuningJob) launches many training jobs with different hyperparameter combinations and reports which one scored best on a chosen metric.
Deployment consumes the artifact independently of how it was produced. CreateModel registers the artifact plus a serving container, then CreateEndpoint stands up a real-time HTTPS endpoint, or a batch transform job (CreateTransformJob) runs offline inference over a dataset in S3.
Monitoring watches a live endpoint for data drift or quality degradation once it is serving traffic.
A minimal, illustrative shape of the middle two stages looks like this - the full call signatures are covered on the following pages:
# --- Python (boto3) - illustrative shape only ---
sm.create_training_job(TrainingJobName="job-1") # produces a model artifact in S3
sm.create_hyper_parameter_tuning_job(HyperParameterTuningJobName="tune-1") # runs many training jobs// --- TypeScript (AWS SDK v3) - illustrative shape only ---
await sm.send(new CreateTrainingJobCommand({ TrainingJobName: "job-1" })); // produces a model artifact in S3
await sm.send(new CreateHyperParameterTuningJobCommand({ HyperParameterTuningJobName: "tune-1" })); // runs many training jobsThe hand-off between stages is always an S3 URI, never a direct API-to-API call. A training job's InputDataConfig points at the S3 prefix data prep wrote to. Its OutputDataConfig says where the resulting artifact should land. A tuning job does not take data directly - it takes a TrainingJobDefinition, which is essentially the same shape as a single training job's configuration, and varies the hyperparameters across trials.
This matters because it means training and tuning are interchangeable at the API level: anywhere a training job can run (built-in algorithm image, your own container, single instance, distributed cluster, spot capacity), a tuning job can wrap it, because under the hood a tuning job is just launching that same kind of training job repeatedly.
Deployment is the other side of the same pattern. CreateModel takes an S3DataUrl pointing at the artifact and a container image to serve it - it has no idea whether that artifact came from a built-in algorithm, a custom container, or the winning trial of a tuning job. This is what makes the stages swappable: you can change your training approach entirely without touching how you deploy.
A SageMaker Experiment (covered later in this section) sits alongside this flow rather than in it - it is metadata recorded about training and tuning jobs, not a stage the data itself passes through.
In production, these stages are rarely called by hand in sequence. SageMaker Pipelines (a separate, higher-level API built from CreateTrainingJob, CreateHyperParameterTuningJob, and similar building blocks) lets you define the sequence as a DAG with conditional steps, caching, and lineage tracking - useful once retraining becomes routine rather than exploratory.
The practical reason to keep the stages mentally separate: cost and blast radius. A training job's cost is bounded by its instance count and duration; a runaway loop of training-job creation is a very different (and cheaper, per-incident) mistake than a runaway loop of endpoint creation, which bills continuously until you delete it. Knowing which stage you are in tells you which Describe* call and which cost model applies.
| Stage | Primary API | Reads | Writes | Ongoing cost? |
|---|---|---|---|---|
| Data prep | CreateProcessingJob | Raw data in S3 | Cleaned data in S3 | No - job-duration only |
| Training | CreateTrainingJob | Prepared data in S3 | Model artifact in S3 | No - job-duration only |
| Tuning | CreateHyperParameterTuningJob | Prepared data in S3 | Best artifact + trial history | No - job-duration only |
| Deployment | CreateModel / CreateEndpoint / CreateTransformJob | Model artifact in S3 | Predictions | Endpoints: yes, until deleted |
| Monitoring | Model Monitor scheduling | Live endpoint traffic | Drift reports | No - scheduled job only |
A common source of surprise bills is stage confusion: an idle real-time endpoint keeps billing hourly, while a finished training or tuning job stops billing the moment its instances terminate.
CreateModel/CreateEndpoint call is required to serve it.Between data preparation and deployment. It reads prepared data from S3 and produces a model artifact in S3; it has no role in serving predictions or preparing the input data itself.
Not really - it is training repeated. A tuning job launches multiple training jobs with different hyperparameter values and reports the best-performing one, using the same training-job configuration shape underneath.
Through the model artifact in S3. CreateModel points at that artifact plus a serving container image, and CreateEndpoint (or a batch transform job) then uses that model resource - independently of which training approach produced the artifact.
No. Pipelines is an optional orchestration layer for defining the stages as a repeatable DAG. You can call CreateProcessingJob, CreateTrainingJob, and CreateEndpoint directly in sequence from your own code.
Real-time endpoints (CreateEndpoint) bill per instance-hour as long as they exist, whether or not they receive traffic. Training, tuning, and processing jobs bill only for the duration their instances actually run.
Alongside the flow, not inside it. It records metadata - parameters, metrics, artifact references - about training and tuning runs so you can compare them later; it is not a stage the data passes through.
Stack versions: This page was written for boto3 1.43.x (Python 3.10+) and the AWS SDK for JavaScript v3 (Node.js 18+).
Revisado por Chris St. John·Última actualización: 24 jul 2026