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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则