Sagemake couldn't access S3 vis athena query
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.
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.
Relevant questions
Athena - Execute multiple query and capture output in a file on e2
asked 2 months agoHow can I find the Query ID for an Athena Saved Query on AWS console?
asked 4 months agoAdditional Costs for running query in Athena on S3
Accepted Answerasked 2 years agoAthena permission error running a query
asked 3 months agoSagemake couldn't access S3 vis athena query
asked 2 months agoAccess Denied Error in Athena query file
asked 2 months agoPowerBI access to S3/Athena
Accepted Answerasked 3 years agoError msg when running query in aws athena
asked a month agoUnable to run Athena query with AmazonAthenaPreviewFunctionality workgroup
Accepted Answerasked 2 years agoCan i execute an Athena saved query from lambda?
Accepted Answer