MLS-C01 Question 364
Select 4You have trained a machine learning model using Amazon SageMaker and deployed it as a real-time endpoint. The endpoint is now exposed for client interactions. Which of the following actions are required to securely interact with the endpoint and make predictions?
- A
Ensure that the IAM role used to invoke the endpoint has permission to call the 'sagemaker:InvokeEndpoint' action.
- B
Send an HTTP POST request to the endpoint with the input payload in JSON format.
- C
Use an SSL/TLS-encrypted connection to interact with the endpoint.
- D
Configure the endpoint's security group to allow inbound traffic from any IP address.
- E
Retrieve the endpoint's URL from the AWS Management Console or using the AWS CLI.
Show answer and explanation
Correct answers: A, B, C, E
Explanation
To securely interact with a SageMaker real-time endpoint, you must ensure proper IAM permissions ('sagemaker:InvokeEndpoint'), use an HTTP POST request with JSON payload, and establish a secure SSL/TLS connection. Additionally, retrieving the endpoint's URL is necessary to make requests. However, configuring the endpoint's security group to allow traffic from any IP address is not recommended as it poses a security risk.
- A. Correct.
Correct: The IAM role or user making the request must have the 'sagemaker:InvokeEndpoint' permission to securely invoke the endpoint.
- B. Correct.
Correct: SageMaker real-time endpoints expect input data to be sent as an HTTP POST request, typically in JSON format.
- C. Correct.
Correct: SageMaker endpoints require the use of SSL/TLS to ensure secure communication between the client and the endpoint.
- D. Incorrect.
Incorrect: Allowing inbound traffic from any IP address is a security risk. It is better to restrict access to trusted IP ranges or specific VPCs.
- E. Correct.
Correct: You need the endpoint's URL, which can be retrieved from the AWS Management Console or via the AWS CLI, to send requests to it.