MLS-C01 Question 362
Select 4You have trained a machine learning model for real-time predictions and deployed it on Amazon SageMaker. To expose the endpoint and interact with it, you want to ensure secure and scalable communication between your web application and the deployed model. Which of the following actions should you take to achieve this?
- A
Enable SSL/TLS on the SageMaker endpoint to encrypt data in transit.
- B
Use Amazon API Gateway to create a REST API that forwards requests to the SageMaker endpoint.
- C
Host the SageMaker endpoint on an EC2 instance to manually manage scaling and security.
- D
Attach an IAM policy to the SageMaker endpoint to control access.
- E
Use AWS Lambda to preprocess input data before sending it to the SageMaker endpoint.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To securely and efficiently expose a SageMaker endpoint, you should use SSL/TLS for encryption, leverage Amazon API Gateway for scalable API management, and enforce access control using IAM policies. Additionally, AWS Lambda can preprocess input data to enhance the quality of predictions. Hosting the endpoint on an EC2 instance is not recommended, as SageMaker endpoints are managed services designed to handle scaling and security without manual intervention.
- A. Correct.
Enabling SSL/TLS ensures secure communication between the client application and the SageMaker endpoint by encrypting data in transit. This is a recommended security best practice.
- B. Correct.
Amazon API Gateway can be used to create a REST API, providing a scalable and secure way to expose the SageMaker endpoint to external clients.
- C. Incorrect.
Hosting the SageMaker endpoint on an EC2 instance is unnecessary and counterproductive since SageMaker endpoints are managed services that handle scaling and security automatically.
- D. Correct.
Attaching an IAM policy to a SageMaker endpoint allows precise access control, ensuring that only authorized users or applications can interact with the endpoint.
- E. Correct.
Using AWS Lambda to preprocess input data can improve the quality of data sent to the SageMaker endpoint, ensuring that the model receives properly formatted and valid inputs.