1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
Judging from the error message, it seems that access to the S3 bucket "aws-athena-query-results-prod-khatabook" has been denied.
As described in the following document, please check whether the IAM user's IAM policy is set to allow access to the S3 bucket.
Please change the S3 bucket name in the IAM policy below to your own S3 bucket name.
https://repost.aws/knowledge-center/access-denied-athena
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::my-athena-source-bucket"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::my-athena-source-bucket/data/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:ListBucketMultipartUploads",
"s3:AbortMultipartUpload",
"s3:PutObject",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::my-athena-result-bucket",
"arn:aws:s3:::my-athena-result-bucket/*"
]
}
]
}
