Hosting an ML model with no infrastructure to manage

AIF-C01 By islever Editorial Last updated

Short answer

A Deploy the image classification model with Amazon SageMaker Serverless Inference to serve predictions without managing underlying infrastructure.

Question

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. Correct 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.

Key Takeaways

The question tests which AWS service can both host an ML model and serve real-time predictions automatically; the trap is picking a merely managed service that cannot execute a model.

This AIF-C01 question tests how to serve real-time predictions from a deployed model with no infrastructure management. Amazon SageMaker Serverless Inference (A) is the only option that hosts a model and scales automatically.

Common mistake: Option C, Amazon API Gateway, is a managed service and can front a web app, but it only routes HTTP requests and cannot host model weights or run inference, so infrastructure would still be needed elsewhere.

Expert Analysis

Reading the requirement The company already has a trained image-classification model and needs two things from the deployment target: it must host the model and return real-time predictions to a web application, and it must do so with zero management of the underlying infrastructure. That rules out anything where the customer still provisions, patches, or scales compute.

Tracing the request path With option A, the model artifact is registered as a SageMaker model and deployed to a serverless inference endpoint. When the web app calls the endpoint, SageMaker automatically provisions compute capacity on demand, runs the image-classification inference, and scales back down when traffic stops. The customer never sees an EC2 instance, an endpoint configuration to tune, or a cluster to size — the entire provision-scale-idle path is handled by AWS, and billing is per millisecond of compute used during inference. This satisfies both halves of the requirement.

Why the others fail Option B is wrong because Amazon CloudFront is a content delivery network: it caches and distributes HTTP objects, it has no mechanism to execute an ML model and produce a prediction. Option C is wrong because API Gateway is an HTTP front end only — it can invoke a Lambda or an HTTP integration, but it cannot by itself host model weights or run inference, so the model would still need somewhere to execute. Option D is wrong because AWS Batch is designed for asynchronous, queued batch jobs on compute environments (often EC2 or Spot) that the customer must define and manage; it is not a real-time prediction host and does not remove infrastructure management.

The trap All three distractors are managed AWS services, so "fully managed" alone is not enough — the service must also serve real-time predictions from an ML model. Only SageMaker Serverless Inference does that, which makes A the correct answer.

Official Reference

https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-inference.html

This link opens the official vendor documentation in a new tab.

Exam Strategy

On deployment questions, filter options by the exact job to be done — "host the model and serve predictions" — before considering whether a service is managed. Eliminate services whose primary purpose is distribution (CloudFront), request routing (API Gateway), or queued async jobs (AWS Batch). Then confirm the remaining option also removes infrastructure duties end to end, not just partially.

Frequently Asked Questions

Why can't Amazon API Gateway serve predictions by itself?

API Gateway only fronts HTTP endpoints and invokes integrations such as Lambda; it cannot store model artifacts or run inference. It can be combined with SageMaker, but the hosting itself must happen elsewhere.

How does SageMaker Serverless Inference differ from a real-time endpoint?

A real-time endpoint keeps provisioned instances that you configure and scale yourself, while serverless inference provisions and scales compute per request automatically and charges only for compute time used during inference.

When is AWS Batch a poor choice for serving this model?

AWS Batch processes queued, asynchronous jobs on compute environments you define, so it cannot provide the immediate, request/response predictions a web application calling an image classifier needs.

More AIF-C01 FAQ →

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.

Discussion 9 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 9

  1. Jessiii 👍 7 Answered 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.
  2. Moon 👍 5 Answered 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.
  3. 85b5b55 👍 2 Answered A
    Amazon SageMaker helps to host the model, and serve predictions without managing infrastructure provisioning and configurations.
  4. 65703c1 👍 2 Answered A
    A is the correct answer
  5. denisjtorresg 👍 1 Answered A
    Why A is correct: Amazon SageMaker Serverless Inference allows you to deploy machine learning models to production and serve real-time predictions without having to configure, scale, or manage any underlying EC2 infrastructure or clusters. It automatically scales compute resources up or down based on incoming traffic and only charges you for the compute time used during inference requests, making it a true serverless deployment option for ML models.
Show 4 more comments
  1. nandhae 👍 1 Answered 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.
  2. Blair77 👍 1 Answered A
    Serverless deployment: SageMaker Serverless Inference allows you to deploy ML models without managing any underlying infrastructure, which directly meets the company's requirement.
  3. minime 👍 1
    A. Use Amazon SageMaker Serverless Inference to deploy the model. With serverless inference, there's no need to manage any infra.
  4. hayjaykay 👍 1 Answered A
    SageMaker is an AWS serverless resource Data Scientists/Engineers utilize to develop foundational models (FMs). Answer is A.

Reader comments & corrections

No reader corrections 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.

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