Previous version: MLA-C01. The current version is
MLA-C02.
Choosing the orchestration tool for an ML workflow
| Criterion | SageMaker Pipelines | Step Functions | Amazon MWAA (Airflow) | CodePipeline |
| Primary role | ML-native training DAG | General service state machine | General DAG scheduler | Software release pipeline |
| Native ML steps | Processing, training, tuning, model, condition, register | Has a SageMaker integration, but steps are generic | Operators incl. SageMaker, but generic | Stages call builds/deploys, not ML steps |
| Infrastructure to manage | Serverless, none | Serverless, none | Managed Airflow environment you size and pay for | Serverless, none |
| ML lineage tracking | Built in | No | No | No |
| Best when | Pure SageMaker ML lifecycle | Workflow spans many AWS services | Team already runs Airflow | Orchestrating the end-to-end release |
Decision tree
Cheat sheet Cheat sheet
- Treat a retrained model like code: ship it through a CI/CD pipeline
- CodePipeline conducts, CodeBuild runs the work, CodeDeploy pushes the artifact
- Use SageMaker Pipelines as the ML-native DAG for the model build
- Pick Step Functions when the workflow spans many AWS services
- Choose Amazon MWAA when the team already runs Apache Airflow
- Model Registry approval is the gate between training and deployment
- Let EventBridge turn a registry approval into a deploy-pipeline trigger
- Update a live endpoint with a deployment guardrail, not a raw swap
- Match the traffic-shifting mode to the risk: all-at-once, canary, or linear
- A CloudWatch alarm during the baking period auto-rolls-back the deploy
- Use a rolling deployment when a full second fleet is too much to provision
- Stand up a standardized MLOps pipeline with a SageMaker Projects template
- Drive automatic retraining with an EventBridge rule
- Code repositories and pipelines are complementary, not the same thing
- Gate model promotion on metrics with a ConditionStep, not just unit tests
- Nest the tools: CodePipeline runs the release, SageMaker Pipelines runs the model build
- Cache unchanged SageMaker Pipeline steps with CacheConfig and an ISO-8601 expire_after
- EventBridge needs a role with sagemaker:StartPipelineExecution and an events.amazonaws.com trust to launch a pipeline
- Pass event fields into a pipeline as parameters with SageMakerPipelineParameters JSONPath
- Match commits to a branch with a CodeCommit Repository State Change event pattern
- Notify or chain on job outcomes with SageMaker Job State Change events
- Append .sync to a SageMaker Task ARN to make Step Functions wait for the job
- Combine Retry and Catch in Step Functions for backoff plus fallback routing
- A Lambda that starts a SageMaker job also needs iam:PassRole for the job's execution role