Provision and configure ML and AI workload resources
Unlock the complete study guide.
Bundled into the existing AWS Certified Machine Learning Engineer - Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- Provisioning resources based on existing architecture
- Deploying a model programmatically
- On-demand versus provisioned capacity
- Choosing the scaling signal
- Waking an endpoint from zero
- Sharing GPU instances with inference components
- Sharing resources between CloudFormation stacks
- Running SageMaker AI jobs from AWS Step Functions
- Building and maintaining ML container images
- SageMaker AI endpoints in a VPC
- Knowledge base ingestion: chunking strategies
- Knowledge base vector index configuration
- AgentCore Runtime compute types
- Managing agent state with AgentCore
- Provisioning an Amazon Bedrock flow
- Matching requirements and symptoms to resource fixes
Scalable target, per-unit load signal and zero-capacity behavior by SageMaker AI endpoint type
| Decision point | Real-time endpoint (production variant) | Real-time endpoint with inference components | Asynchronous endpoint | Serverless endpoint |
|---|---|---|---|---|
| Scalable target (what is counted) | Instance count of the variant | Copy count of each inference component | Instance count of the variant | Provisioned concurrency |
| Per-unit load signal | InvocationsPerInstance; ConcurrentRequestsPerModel for token streaming | InvocationsPerCopy or ConcurrentRequestsPerCopy | ApproximateBacklogSizePerInstance | SageMakerVariantProvisionedConcurrencyUtilization |
| Can capacity reach zero? | No: scaling to zero requires inference components | Yes, with managed instance scaling MinInstanceCount set to 0 and minimum copy capacity 0 for every hosted inference component | Yes, with MinCapacity 0 on the scalable target | Yes, on-demand capacity scales to zero automatically |
| Request that arrives at zero capacity | Not applicable | Fails until an instance is provisioned; a NoCapacityInvocationFailures alarm starts step scaling | Waits in the queue; a HasBacklogWithoutCapacity alarm starts step scaling | Served after a cold start; provisioned concurrency avoids it |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
References
- https://docs.aws.amazon.com/sagemaker/latest/dg/async-inference.html
- https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain3.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-deploy-models.html
- https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html
- https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ProductionVariant.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-modelbuilder-creation.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints-autoscale.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/async-inference-autoscale.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-zero-instances.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/endpoint-auto-scaling-add-code-define.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-exports.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-sagemaker-model.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-importvalue.html
- https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html
- https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html
- https://docs.aws.amazon.com/eks/latest/best-practices/image-security.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html
- https://docs.aws.amazon.com/lambda/latest/dg/python-image.html
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html
- https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_ImageIdentifier.html
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-pull-ecr-image.html
- https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr_assets.DockerImageAsset.html
- https://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_on_EKS.html
- https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/interface-vpc-endpoint.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html
- https://docs.aws.amazon.com/aws-certification/latest/machine-learning-engineer-associate-02/machine-learning-engineer-associate-02-domain4.html
- https://docs.aws.amazon.com/sagemaker/latest/dg/mkt-algo-model-internet-free.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/kb-chunking.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/kb-data-source-sync-ingest.html
- https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/agents-tools-runtime.html
- https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-instances-how-it-works.html
- https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory-types.html
- https://docs.aws.amazon.com/bedrock/latest/userguide/flows.html