Review sheet
Deployment and Orchestration of ML and AI Workflows
The main points of this domain on a few screens, to reread before the exam.
3.1How models run
- Bedrock: no servers. SageMaker AI endpoint: GPUs and custom models. Lambda: small and rare.
- ECS, EKS and EC2: most control, you run the model server. AWS Batch: queued offline jobs.
- API Gateway plus Lambda in front of a model: authentication, throttling, prompt shaping.
- SageMaker AI hosting: create_model, create_endpoint_config, create_endpoint, then Runtime invoke_endpoint.
- Change a live endpoint with a new endpoint config and update_endpoint. Configs cannot be edited.
- Multi-model endpoint: many models from S3, cold start on the first call. Inference components: per-model copies.
3.1How models run
- Serial pipeline: 2 to 15 containers in a row. Direct multi-container: pick one with TargetContainerHostname.
- Orchestrators: Pipelines is ML-native, Step Functions is general, MWAA is Airflow, EventBridge starts them.
Real-time
- Fits
- Steady traffic, milliseconds, GPU
- Key limits
- 25 MB, 60 seconds
Serverless
- Fits
- Spiky traffic, idle gaps, small model
- Key limits
- 1 to 6 GB, concurrency up to 200, no GPU
Asynchronous
- Fits
- Big or slow requests, scale to zero
- Key limits
- 1 GB, 1 hour, result in S3
Batch transform
- Fits
- Whole S3 dataset, no endpoint
- Key limits
- Instances stop after the job
| Inference type | Fits | Key limits |
|---|---|---|
| Real-time | Steady traffic, milliseconds, GPU | 25 MB, 60 seconds |
| Serverless | Spiky traffic, idle gaps, small model | 1 to 6 GB, concurrency up to 200, no GPU |
| Asynchronous | Big or slow requests, scale to zero | 1 GB, 1 hour, result in S3 |
| Batch transform | Whole S3 dataset, no endpoint | Instances stop after the job |
1 / 2
Real-time
- Fits
- Steady traffic, milliseconds, GPU
- Key limits
- 25 MB, 60 seconds
Serverless
- Fits
- Spiky traffic, idle gaps, small model
- Key limits
- 1 to 6 GB, concurrency up to 200, no GPU
| Inference type | Fits | Key limits |
|---|---|---|
| Real-time | Steady traffic, milliseconds, GPU | 25 MB, 60 seconds |
| Serverless | Spiky traffic, idle gaps, small model | 1 to 6 GB, concurrency up to 200, no GPU |
2 / 2
Asynchronous
- Fits
- Big or slow requests, scale to zero
- Key limits
- 1 GB, 1 hour, result in S3
Batch transform
- Fits
- Whole S3 dataset, no endpoint
- Key limits
- Instances stop after the job
| Inference type | Fits | Key limits |
|---|---|---|
| Asynchronous | Big or slow requests, scale to zero | 1 GB, 1 hour, result in S3 |
| Batch transform | Whole S3 dataset, no endpoint | Instances stop after the job |
3.1Foundation models, agents and RAG
- Geographic inference profile keeps data in a geography. Global profile is about 10% cheaper.
- Inference profiles do not support Provisioned Throughput.
- Large models: tensor parallel degree splits layers across GPUs. Quantization cuts memory.
- Big models need more VolumeSizeInGB and longer download and health check timeouts.
- Own model on SageMaker AI: model.tar.gz in S3 plus a container. Bedrock imports Hugging Face safetensors.
- Agents Classic is closed to new customers (checked November 25, 2026). AgentCore is the successor.
- AgentCore: Runtime hosts, Gateway makes MCP tools, Identity handles inbound and outbound auth.
3.1Foundation models, agents and RAG
- MCP connects agents to tools. A2A connects agents to agents. Start with one agent.
- Hybrid search adds keywords. A reranker reorders chunks and can shrink the prompt, at extra cost.
Bedrock on-demand
- You manage
- Nothing
- Pick it when
- Variable traffic, pay per token
Provisioned Throughput
- You manage
- Model units
- Pick it when
- Steady load or some customized models
Cross-Region profile
- You manage
- Nothing
- Pick it when
- Spikes. Geographic for residency
Marketplace or JumpStart
- You manage
- Endpoint instances
- Pick it when
- Model not serverless in Bedrock
EC2 or EKS
- You manage
- Everything
- Pick it when
- Own engine, full control
| Option | You manage | Pick it when |
|---|---|---|
| Bedrock on-demand | Nothing | Variable traffic, pay per token |
| Provisioned Throughput | Model units | Steady load or some customized models |
| Cross-Region profile | Nothing | Spikes. Geographic for residency |
| Marketplace or JumpStart | Endpoint instances | Model not serverless in Bedrock |
| EC2 or EKS | Everything | Own engine, full control |
1 / 2
Bedrock on-demand
- You manage
- Nothing
- Pick it when
- Variable traffic, pay per token
Provisioned Throughput
- You manage
- Model units
- Pick it when
- Steady load or some customized models
Cross-Region profile
- You manage
- Nothing
- Pick it when
- Spikes. Geographic for residency
| Option | You manage | Pick it when |
|---|---|---|
| Bedrock on-demand | Nothing | Variable traffic, pay per token |
| Provisioned Throughput | Model units | Steady load or some customized models |
| Cross-Region profile | Nothing | Spikes. Geographic for residency |
2 / 2
Marketplace or JumpStart
- You manage
- Endpoint instances
- Pick it when
- Model not serverless in Bedrock
EC2 or EKS
- You manage
- Everything
- Pick it when
- Own engine, full control
| Option | You manage | Pick it when |
|---|---|---|
| Marketplace or JumpStart | Endpoint instances | Model not serverless in Bedrock |
| EC2 or EKS | Everything | Own engine, full control |
3.2Capacity, containers and networks
- Provisioned Throughput: model units, hourly, 0, 1 or 6 months. A customized Bedrock model may need it. An imported one does not.
- Break-even: hourly price divided by price per token gives tokens per hour.
- Own container: train and serve commands, /opt/ml/model, port 8080, GET /ping, POST /invocations.
- ECR pull needs execution role permissions. Turn on image scanning.
- No GPU on Fargate. ECS and EKS use EC2 GPU nodes. Batch holds queued jobs.
- VpcConfig for models and jobs. Interface endpoints for runtime, API, ECR and logs. S3 gateway endpoint.
- Network isolation blocks all outbound calls from the container.
3.2Capacity, containers and networks
- Target tracking on invocations per instance. LLMs: concurrent requests, updated every 10 seconds.
- GPU scale to zero needs inference components. Scale-out takes minutes, so buffer requests.
Real-time
- Invocations per instance, or concurrent requests
Inference component
- Concurrent requests per copy
Asynchronous
- Backlog per instance
Serverless
- Provisioned concurrency
| Endpoint type | Scale on |
|---|---|
| Real-time | Invocations per instance, or concurrent requests |
| Inference component | Concurrent requests per copy |
| Asynchronous | Backlog per instance |
| Serverless | Provisioned concurrency |
3.2Knowledge bases, agents and infrastructure as code
- Knowledge base chunking: default 300 tokens, fixed, hierarchical, semantic or none. Fixed after creation.
- Sync is incremental. Check ingestion jobs for failed documents.
- Metadata filters need file.ext.metadata.json. OpenSearch Serverless needs the faiss engine.
- Retrieve returns chunks. RetrieveAndGenerate returns an answer with citations.
- Query decomposition splits a hard question. Route across knowledge bases in a Lambda pipeline.
- Agent memory: short-term for the session, long-term across sessions. DynamoDB for custom state.
- Flows for fixed paths. Step Functions for long processes. Slow tools go through SQS and a worker.
3.2Knowledge bases, agents and infrastructure as code
- CloudFormation has SageMaker AI and Bedrock resources. Custom Model Import has no CloudFormation support.
3.3Release strategies and CI/CD tools
- SageMaker AI guardrails: blue/green with all at once, canary or linear, alarms and baking period.
- Deployment guardrails apply to real-time and asynchronous endpoints, not serverless.
- CodeDeploy: canary, linear, all-at-once for Lambda and ECS. Hooks run your checks.
- CodePipeline: stages and actions. Manual approval pauses. CodeConnections links GitHub.
- Cross-account delivery needs a role and a customer managed KMS key.
- CodeBuild: buildspec phases, privileged mode for Docker, secrets from Secrets Manager.
- A VPC build needs a NAT gateway or endpoints.
3.3Release strategies and CI/CD tools
- CodeCommit availability has changed more than once. Check it before relying on it.
Blue/green
- New fleet, shift traffic, alarms, auto rollback
Canary or linear
- A slice first, or equal steps
Rolling
- Batches, less spare capacity
Shadow
- Copy of traffic, answers dropped
CodeDeploy
- Canary or linear for Lambda and ECS
| Strategy | How it works |
|---|---|
| Blue/green | New fleet, shift traffic, alarms, auto rollback |
| Canary or linear | A slice first, or equal steps |
| Rolling | Batches, less spare capacity |
| Shadow | Copy of traffic, answers dropped |
| CodeDeploy | Canary or linear for Lambda and ECS |
3.3MLOps, prompts and agent releases
- Pipelines steps: Processing, Training, Tuning, Condition, Register, Callback, Lambda, Fail.
- Step caching skips unchanged steps. Retry policies handle faults and capacity errors.
- Tests: unit, data validation, quality gate, regression against production, staging integration and load.
- Retrain on a schedule, new data or an alarm. Challenger must beat the champion.
- Avoid retrain loops: minimum interval, limited concurrency, labeled data only.
- Registry status Approved starts deployment. A resource policy shares groups across accounts.
- Prompts: use a saved version, not the draft. Variants compare wordings.
3.3MLOps, prompts and agent releases
- Agents: version, test, then move the alias or endpoint. DEFAULT follows the latest version.
- Golden prompt sets and judge scores fail the build. A custom model may need Provisioned Throughput.
- RAG refresh: S3 event, EventBridge, Lambda, ingestion job. A new embeddings model needs a new index.
Exam traps
- “Spiky traffic, long idle gaps, small model” → serverless inference, not a real-time endpoint
- “Large payload, long job, someone waits for the result later” → asynchronous inference, not batch transform
- “Score a whole S3 dataset, no endpoint left” → batch transform, not real-time
- “Thousands of rarely used models” → multi-model endpoint, not one endpoint per model
- “Data must stay in the EU” → geographic inference profile, not a global profile
- “Fine-tuned Bedrock model, steady high traffic” → Provisioned Throughput. On-demand is for light or variable traffic, and only some models support it
Exam traps
- “Fixed steps, known in advance” → Bedrock Flows, not an agent
- “Container health check fails” → /ping not returning 200 on port 8080
- “Training in a VPC cannot pull data or the image” → S3 gateway endpoint and ECR endpoints
- “Wait for a job inside a workflow” → .sync in a Standard workflow, not Express
- “Approve a model, then deploy” → Model Registry Approved status, not a manual redeploy
- “Production agent changed after an update” → DEFAULT endpoint follows the latest version