MLA-C01 Question 285
Select 3You are tasked with deploying a machine learning model using Amazon SageMaker. The model needs to be deployed with an endpoint for real-time inference, and the infrastructure must scale automatically based on traffic. Which combination of actions should you take to meet these requirements?
- A
Use the SageMaker CreateEndpoint API to deploy the model and configure auto-scaling policies for the endpoint.
- B
Create an AWS Lambda function to deploy the model and scale instances based on traffic.
- C
Use Amazon EC2 instances to manually host the model and implement a custom scaling mechanism.
- D
Configure an Amazon SageMaker endpoint with an endpoint configuration that specifies initial instance count and instance type.
- E
Use AWS Auto Scaling to define scaling policies for the SageMaker endpoint based on metrics like CPU utilization or Invocation count.
Show answer and explanation
Correct answers: A, D, E
Explanation
To deploy a machine learning model for real-time inference using Amazon SageMaker, you must create a SageMaker endpoint using the CreateEndpoint API and configure it with an endpoint configuration that specifies the instance type and initial instance count. To enable automatic scaling, you should define auto-scaling policies for the SageMaker endpoint based on traffic metrics such as CPU utilization or Invocation count. This approach ensures scalability and efficient resource utilization, aligning with the deployment requirements.
- A. Correct.
Correct: The SageMaker CreateEndpoint API allows you to deploy a pre-trained model to a SageMaker endpoint, and auto-scaling can be configured for the endpoint to adjust based on traffic.
- B. Incorrect.
Incorrect: AWS Lambda is not typically used to deploy machine learning models or handle auto-scaling for SageMaker endpoints. Lambda is better suited for serverless event-driven tasks.
- C. Incorrect.
Incorrect: Using EC2 instances and manually implementing scaling mechanisms adds unnecessary complexity and does not leverage SageMaker's built-in deployment and scaling features.
- D. Correct.
Correct: Configuring a SageMaker endpoint with an endpoint configuration is required to specify the instance type and the number of instances for the deployment.
- E. Correct.
Correct: AWS Auto Scaling can be set up for SageMaker endpoints to automatically scale instances based on metrics like CPU utilization or Invocation count, fulfilling the requirement for automatic scaling.