Choosing a SageMaker AI Inference Option
This lesson explains how latency requirements, payload size, processing time and traffic pattern decide between SageMaker AI's four inference options, one of the most frequently tested decisions on the exam.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish real-time and serverless inference.
- Distinguish asynchronous inference and batch transform.
- Follow the decision flow to choose an option.
Real-time and serverless inference
Real-time inference hosts a model on persistent instances behind an HTTPS endpoint for low-latency, synchronous requests. It supports payloads up to 25 MB and processing up to 60 seconds (8 minutes for streaming responses), GPUs, auto scaling, multiple variants and data capture. You pay for instances while they run.
Serverless inference runs models without instances to manage and scales to zero when idle, so you pay per request duration. It suits intermittent or unpredictable traffic that tolerates cold starts, with payloads up to 4 MB, processing up to 60 seconds, memory up to 6 GB and no GPU support. Provisioned concurrency keeps capacity warm for predictable bursts.
25MB
Real-time inference payload
60s
Real-time and serverless processing time
4MB
Serverless inference payload
6GB
Serverless inference memory
Real-time or serverless?
Asynchronous inference and batch transform
Asynchronous inference queues requests: the client uploads the input to S3 and calls InvokeEndpointAsync, and the result is written to S3 with an optional SNS notification. It supports payloads up to 1 GB and processing up to one hour, and it can scale to zero when the queue is empty. It suits large inputs such as documents, audio and video, or slow models.
Batch transform processes an entire dataset in S3 with no persistent endpoint: SageMaker AI starts instances, splits the input, runs inference, writes results and stops. It suits scheduled scoring of large datasets. Bedrock batch inference is the equivalent for FMs.
The following table summarises the options.
| Option | Payload / time | Scales to zero | Best for |
|---|---|---|---|
| Real-time | 25 MB / 60 s (8 min streaming) | No (except inference components) | Low-latency, steady traffic |
| Serverless | 4 MB / 60 s, no GPU | Yes | Intermittent traffic, cold starts acceptable |
| Asynchronous | 1 GB / 1 hour | Yes | Large payloads, long processing, queued requests |
| Batch transform | Whole datasets | No endpoint | Offline scoring of datasets |
1GB
Asynchronous inference payload
1hour
Asynchronous inference processing time
Asynchronous or batch?
Decision flow
SageMaker AI offers four inference options, and a short sequence of questions chooses between them. First, does the caller need an immediate response? If not, and the input is a whole dataset, such as all customers to score overnight, batch transform processes it without a persistent endpoint. If requests arrive one at a time but can wait, for example large documents taking minutes to process, asynchronous inference queues them and can scale to zero.
If an immediate response is needed, the next question is whether the model needs a GPU or consistently low latency; if so, real-time inference on provisioned instances is the answer. If traffic is sporadic and occasional cold-start latency is acceptable, serverless inference charges only for requests and scales to zero.
The following diagram shows the decision flow for choosing between the SageMaker AI inference options.

Four workloads
A company has four inference workloads.
| Workload | Option | Reason |
|---|---|---|
| Score 40 million customers for a monthly campaign | Batch transform | Offline dataset, no endpoint needed |
| Transcribe-and-classify 200 MB call recordings, results within an hour | Asynchronous inference | Large payload, long processing |
| Fraud check during checkout, 3,000 requests per second | Real-time with auto scaling | Low latency, steady traffic |
| Internal tool used a few times a day | Serverless inference | Idle most of the time; cold starts acceptable |
Serving the internal tool from a real-time endpoint would pay for an instance 24 hours a day for a few minutes of use.
Which inference option suits offline scoring of a whole dataset?
Show answer
Batch transform.
Exam Tips
Remember for the exam
- Large payloads or long processing: asynchronous inference (1 GB, 1 hour).
- Offline datasets: batch transform.
- Intermittent traffic, no GPU, cold starts acceptable: serverless inference.
- Steady low-latency traffic or GPUs: real-time endpoints.
- Asynchronous endpoints can scale to zero when the queue is empty.