Sagemake couldn't access S3 vis athena query

0

I have access denied issue when running AWS sagemaker and running a script that will access AWS Athena I can execute the Athena query directly via the AWS console But when using sagemaker executing the query, I got following error

Permission denied on S3 path: s3://...
This query ran against the "mydatabse" database, unless qualified by the query. Please post the error message on our forum  or contact customer support  with Query Id: 3a825c36-7389-409c-be1e-34d4bcd4256a

I'm pretty sure I provide the sagemaker execution role all the s3:* permission on my bucket but still couldn't access it. Please help me solving the issue.

1 個回答
1

Looks like it's a permission issue. Take a look at the blog below and review step 2 of the "Data analysis and management using Amazon SageMaker" section... https://aws.amazon.com/blogs/machine-learning/run-sql-queries-from-your-sagemaker-notebooks-using-amazon-athena/

I suspect something's missing in this step: "Under Notebook Instance settings populate the Notebook instance name, choose an instance type, and a role for the notebook instances in Amazon SageMaker to interact with Amazon S3. The SageMaker execution role needs to have necessary permission to Athena, the S3 buckets where the data resides, and KMS if encrypted."

I'm also sharing the following resource which can help troubleshoot "Access Denied" errors related to Athena... https://aws.amazon.com/premiumsupport/knowledge-center/access-denied-athena/

Hopefully these resources help you resolving the error.

AWS
已回答 2 年前
AWS
專家
已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南