MLA-C01 Question 257
Select 3You are building a machine learning model to classify customer reviews as positive or negative. After training the model in Amazon SageMaker, you want to deploy it to an endpoint for real-time inference while ensuring scalability to handle varying traffic loads. Which of the following steps or configurations would be required to achieve this?
- A
Use the SageMaker 'CreateModel' API to define the model container and specify the S3 location of the trained model artifacts.
- B
Deploy the model to a SageMaker endpoint with auto-scaling enabled to handle varying traffic loads.
- C
Use Amazon SageMaker Ground Truth to preprocess the incoming inference requests in real time.
- D
Configure an Amazon CloudWatch alarm to monitor endpoint metrics and trigger automatic scaling adjustments.
- E
Package the model as a Docker container and manually deploy it to an Amazon EC2 instance for real-time inference.
Show answer and explanation
Correct answers: A, B, D
Explanation
To deploy a SageMaker model for scalable real-time inference, you need to define the model using the 'CreateModel' API, deploy it to a SageMaker endpoint with auto-scaling enabled, and use CloudWatch alarms to monitor and adjust scaling as needed. This approach ensures your deployment is both scalable and managed, aligning with best practices for ML workloads on AWS.
- A. Correct.
Correct. The 'CreateModel' API is required to define the model container and specify the S3 location of the trained model artifacts. This step is essential for SageMaker to locate and use the trained model.
- B. Correct.
Correct. Deploying the model to a SageMaker endpoint with auto-scaling enabled ensures the endpoint can handle varying traffic loads effectively.
- C. Incorrect.
Incorrect. Amazon SageMaker Ground Truth is used for data labeling, not for preprocessing inference requests in real-time.
- D. Correct.
Correct. Configuring Amazon CloudWatch alarms allows you to monitor endpoint metrics (e.g., latency, throughput) and trigger automatic scaling to maintain performance during traffic fluctuations.
- E. Incorrect.
Incorrect. While using Docker containers and EC2 is a valid approach, it does not leverage SageMaker's managed endpoint services, which are specifically designed for scalable real-time inference.