AIF-C01 Question 47
Select 3A data science team has trained a machine learning model to predict customer churn. They want to deploy this model in production to make real-time predictions. Which of the following are appropriate methods to deploy the model in AWS?
- A
Use Amazon SageMaker to create an endpoint for the model as a managed API service.
- B
Deploy the model on an EC2 instance, expose it via a REST API, and manage the infrastructure yourself.
- C
Upload the trained model to an Amazon S3 bucket and use AWS Lambda to invoke it directly.
- D
Deploy the model on AWS Elastic Beanstalk and configure it to serve predictions via an API.
- E
Use Amazon Rekognition to host the model and provide predictions.
Show answer and explanation
Correct answers: A, B, D
Explanation
Deploying a machine learning model in production can be done through managed services like Amazon SageMaker, or self-hosted solutions such as EC2 or Elastic Beanstalk. These methods provide flexibility in deployment and scaling. However, AWS services like Rekognition are pre-trained and cannot host custom models, and Lambda requires additional integration to work with machine learning models.
- A. Correct.
Using Amazon SageMaker to create an endpoint is a managed service approach. AWS handles the infrastructure, scaling, and deployment, making it a suitable option for production.
- B. Correct.
Deploying the model on an EC2 instance and exposing it via a REST API is a self-hosted method. This approach requires managing infrastructure, but it is a valid deployment method.
- C. Incorrect.
AWS Lambda cannot directly invoke a machine learning model stored in an S3 bucket. While Lambda can be used in conjunction with other services, it is not a standalone deployment method for this use case.
- D. Correct.
Deploying the model on AWS Elastic Beanstalk and configuring it to serve predictions via an API is a valid self-hosted method, as Elastic Beanstalk simplifies application deployment and scaling.
- E. Incorrect.
Amazon Rekognition is a pre-trained AWS service for image and video analysis. It cannot be used to host custom machine learning models.