MLS-C01 · Question #320
A data scientist stores financial datasets in Amazon S3. The data scientist uses Amazon Athena to query the datasets by using SQL. The data scientist uses Amazon SageMaker to deploy a machine…
The correct answer is A. Attach the AmazonAthenaFullAccess AWS managed policy to the user identity. B. Include a policy statement for the data scientist's IAM user that allows the IAM user to perform the E. Include the SQL statement "USING EXTERNAL FUNCTION ml_function_name'' in the Athena. Invoking a SageMaker model from Athena SQL uses the Athena ML feature, which requires three things to work together. First, the IAM user needs Athena query permissions - attaching AmazonAthenaFullAccess (A) covers this. Second, the IAM user needs an explicit IAM policy…
Question
A data scientist stores financial datasets in Amazon S3. The data scientist uses Amazon Athena to query the datasets by using SQL. The data scientist uses Amazon SageMaker to deploy a machine learning (ML) model. The data scientist wants to obtain inferences from the model at the SageMaker endpoint. However, when the data scientist attempts to invoke the SageMaker endpoint, the data scientist receives SQL statement failures. The data scientist's IAM user is currently unable to invoke the SageMaker endpoint. Which combination of actions will give the data scientist's IAM user the ability to invoke the SageMaker endpoint? (Choose three.)
Options
- AAttach the AmazonAthenaFullAccess AWS managed policy to the user identity.
- BInclude a policy statement for the data scientist's IAM user that allows the IAM user to perform the
- CInclude an inline policy for the data scientist's IAM user that allows SageMaker to read S3 objects.
- DInclude a policy statement for the data scientist's IAM user that allows the IAM user to perform the
- EInclude the SQL statement "USING EXTERNAL FUNCTION ml_function_name'' in the Athena
- FPerform a user remapping in SageMaker to map the IAM user to another IAM user that is on the
How the community answered
(40 responses)- A70% (28)
- C5% (2)
- D18% (7)
- F8% (3)
Explanation
Invoking a SageMaker model from Athena SQL uses the Athena ML feature, which requires three things to work together. First, the IAM user needs Athena query permissions - attaching AmazonAthenaFullAccess (A) covers this. Second, the IAM user needs an explicit IAM policy statement granting sagemaker:InvokeEndpoint on the target endpoint ARN (B), because Athena proxies the call on behalf of the user's identity. Third, the SQL query itself must include the 'USING EXTERNAL FUNCTION' syntax (E) to declare the SageMaker endpoint as an external ML function that Athena can call. Option C (SageMaker reading S3) pertains to the SageMaker execution role, not the user's permissions. Option D is a distractor with a similar but incorrect action. Option F (user remapping) is not a real SageMaker feature.
Topics
Community Discussion
No community discussion yet for this question.