How to Deploy an ML Model Serverlessly on AWS?

A company has developed an ML model for image classification. The company wants to deploy the model to production so that a web application can use the model. The company needs to implement a solution to host the model and serve predictions without managing any of the underlying infrastructure. Which solution will meet these requirements?

  1. Use Amazon SageMaker Serverless Inference to deploy the model. Source Reference Answer
  2. Use Amazon CloudFront to deploy the model.
  3. Use Amazon API Gateway to host the model and serve predictions.
  4. Use AWS Batch to host the model and serve predictions.

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

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.

Community Discussion (6 comments)

Jessiii 👍 2 Selected: A
Use 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 Selected: A
Amazon SageMaker helps to host the model, and serve predictions without managing infrastructure provisioning and configurations.
nandhae 👍 1 Selected: A
A. 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.
Moon 👍 1 Selected: A
A: 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.
Blair77 👍 1 Selected: A
Serverless deployment: SageMaker Serverless Inference allows you to deploy ML models without managing any underlying infrastructure, which directly meets the company's requirement.
minime 👍 1
A. Use Amazon SageMaker Serverless Inference to deploy the model. With serverless inference, there's no need to manage any infra.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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.

Related Analysis

Practice All AIF-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full AIF-C01 Practice Test →

← Back to AIF-C01 Study Guide