How to Deploy an ML Model Serverlessly on AWS?
Short answer
A Use Amazon SageMaker Serverless Inference to deploy the model.
Question
Key Takeaways
This question tests the ability to identify the correct AWS service for serverless ML model hosting; the trap is selecting general-purpose serverless or API services that do not natively host ML models.
Amazon SageMaker Serverless Inference enables fully managed, serverless deployment of machine learning models for serving predictions without managing underlying infrastructure. It is the correct AWS service for hosting ML models with automatic scaling and zero infrastructure provisioning.
Common mistake: Candidates often choose Amazon API Gateway or Amazon CloudFront because they are serverless AWS services, but neither can host or execute ML models—they only route or cache HTTP traffic.
Expert Analysis
Correct Answer: A – Amazon SageMaker Serverless Inference
Amazon SageMaker Serverless Inference is a fully managed feature of Amazon SageMaker specifically designed to deploy machine learning models and serve predictions without requiring users to provision, configure, or manage any underlying infrastructure such as EC2 instances. It automatically scales compute capacity based on incoming request traffic, making it ideal for intermittent or unpredictable workloads—exactly matching the scenario described.
Why the Other Options Are Incorrect
- B – Amazon CloudFront: CloudFront is a Content Delivery Network (CDN) used to cache and deliver static and dynamic web content globally. It cannot host or execute machine learning models.
- C – Amazon API Gateway: While API Gateway is a serverless service for creating and managing RESTful APIs, it does not host ML models. It can invoke a model hosted elsewhere (e.g., a SageMaker endpoint), but it cannot serve predictions on its own.
- D – AWS Batch: AWS Batch is designed for running large-scale batch computing jobs, not for serving real-time predictions via a web application. It also requires managing compute environments and job definitions.
Community Consensus
All community voters (100%) selected Option A, with comments consistently highlighting that SageMaker Serverless Inference eliminates infrastructure management while providing automatic scaling—directly fulfilling the company's requirements.
Official Reference
https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When the question emphasizes 'hosting a model' and 'no infrastructure management,' immediately look for SageMaker-specific inference options. Eliminate services that only handle traffic routing, caching, or batch jobs—they cannot execute ML models.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
Jessiii 👍 2 Answered AUse Amazon SageMaker Serverless Inference to deploy the model: Amazon SageMaker Serverless Inference allows you to deploy machine learning models in a fully managed, serverless environment. You don't need to manage the underlying infrastructure (such as EC2 instances) to handle predictions. This is ideal for scenarios like yours, where the model needs to be deployed and used by a web application, and scalability and infrastructure management should be abstracted away.
-
85b5b55 👍 2 Answered AAmazon SageMaker helps to host the model, and serve predictions without managing infrastructure provisioning and configurations.
-
Moon 👍 1 Answered AA: Use Amazon SageMaker Serverless Inference to deploy the model. Explanation: Amazon SageMaker Serverless Inference is a fully managed solution for deploying machine learning models without managing the underlying infrastructure. It automatically provisions compute capacity, scales based on request traffic, and serves predictions efficiently. This makes it an ideal choice for hosting a model and serving predictions for a web application with minimal management overhead. Why not the other options? B: Use Amazon CloudFront to deploy the model: Amazon CloudFront is a content delivery network (CDN) C: Use Amazon API Gateway to host the model and serve predictions: Amazon API Gateway is used to create APIs for accessing services. D: Use AWS Batch to host the model and serve predictions: AWS Batch is designed for batch processing and job scheduling, not for real-time inference or hosting ML models for web applications.
-
nandhae 👍 1 Answered AA. Use Amazon SageMaker Serverless Inference to deploy the model. Amazon SageMaker Serverless Inference is specifically designed for hosting ML models and serving predictions without requiring the management of underlying infrastructure. It automatically provisions compute resources as needed and is ideal for use cases like the one described.
-
Blair77 👍 1 Answered AServerless deployment: SageMaker Serverless Inference allows you to deploy ML models without managing any underlying infrastructure, which directly meets the company's requirement.
Show 1 more comment
-
minime 👍 1A. Use Amazon SageMaker Serverless Inference to deploy the model. With serverless inference, there's no need to manage any infra.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AIF-C01 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AIF-C01 Practice Test →