Question 1,234 of 1,672
Deploying PyTorch Models for Real-Time Inference with SageMaker Endpoints
A data scientist needs to deploy a PyTorch model for real-time inference. Which AWS service is best suited for this task?
Quick Answer
The requirement that should guide this answer is real-time inference, which specifically means synchronous, low-latency responses to individual requests as they arrive, a very different need from batch scoring of large offline datasets. Amazon SageMaker real-time endpoints are purpose-built for exactly this use case: once deployed, SageMaker manages the underlying infrastructure automatically, including provisioning instances, load balancing requests across them, performing health checks, and scaling capacity, so the data scientist doesn't have to build or operate that infrastructure themselves. SageMaker also supports PyTorch specifically through its inference toolkit, which lets a PyTorch model be packaged into a container that conforms to the serving interface a SageMaker endpoint expects, so the framework choice doesn't require custom infrastructure work beyond using SageMaker's supported tooling. This combination, a managed hosting layer plus native framework support, is what makes SageMaker real-time endpoints the natural choice whenever the requirement is synchronous, low-latency serving of a trained model, as opposed to scenarios that call for asynchronous or batch-style scoring, which SageMaker handles through different features entirely, such as batch transform for offline scoring or asynchronous inference for large payloads that tolerate delay. When a scenario specifically calls out real-time inference for a trained model in a common framework like PyTorch or TensorFlow, that phrasing itself is usually enough of a signal to point toward a managed real-time endpoint rather than a batch or asynchronous alternative.
⚠ Common exam trap
It's easy for candidates to confuse batch inference with real-time inference, or assume that any container service (like ECS or Lambda) is equally suitable, failing to recognize that SageMaker endpoints provide ML-specific optimizations like model versioning, A/B testing, and built-in CloudWatch metrics for inference latency.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Amazon SageMaker real-time endpoint
Amazon SageMaker real-time endpoints are purpose-built for hosting ML models that require low-latency, synchronous inference. They automatically manage the underlying infrastructure, including scaling, load balancing, and health checks, and support custom PyTorch containers via the SageMaker inference toolkit. This makes them the optimal choice for deploying a PyTorch model for real-time inference.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon SageMaker Batch Transform
Why it's wrong here
Batch Transform is for asynchronous, batch inference, not real-time.
- ✗
Amazon ECS with Fargate
Why it's wrong here
Amazon ECS with Fargate manages container orchestration but lacks native PyTorch model serving optimisations such as automatic batching, GPU memory pooling, or a built-in inference API endpoint. It is tempting because Fargate abstracts server management, making it suitable for deploying any containerised application, including batch inference jobs where latency and request-level GPU scheduling are not critical.
- ✗
AWS Lambda with custom container
Why it's wrong here
Lambda has 15-minute timeout and 10GB memory limit, unsuitable for large models.
- ✓
Amazon SageMaker real-time endpoint
Why this is correct
SageMaker provides managed real-time endpoints with auto-scaling and built-in model hosting.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on MLS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A data scientist wants to deploy a PyTorch model for real-time inference with low latency. Which AWS service should they use?
easy- A.Amazon Elastic Container Service (ECS)
- B.Amazon SageMaker batch transform
- ✓ C.Amazon SageMaker real-time endpoint
- D.AWS Lambda
Why C: Amazon SageMaker real-time endpoints are specifically designed for low-latency inference on deployed models, including PyTorch models. They provide persistent HTTPS endpoints that autoscale and support custom containers, making them ideal for real-time prediction workloads.
Last reviewed: Jul 4, 2026
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.