- Newest
- Most votes
- Most comments
The error message you're encountering indicates that the IAM role you're using (DCEAFEAthenaAccessRole) does not have the necessary permissions to access the S3 bucket where your Athena data is stored. Specifically, the role lacks the s3:GetObject permission for the specified S3 object.
To resolve this issue, you need to update the IAM permissions for the DCEAFEAthenaAccessRole. Here are the steps you should take:
-
Review the IAM policy attached to the DCEAFEAthenaAccessRole.
-
Ensure that the policy includes the s3:GetObject permission for the specific S3 bucket and objects that Athena needs to access. You may need to add a statement similar to this:
{ "Effect": "Allow", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::dcea-nset-curation-prod-us-east-1/*" }
-
If the S3 bucket is in a different AWS account, make sure that the bucket policy allows access from your account and the specific IAM role.
-
Check if there are any explicit deny statements in the IAM policies or S3 bucket policies that might be overriding the allow statements.
-
Verify that the S3 bucket and the objects within it have the correct permissions set.
-
If you're using AWS Organizations, ensure that there are no Service Control Policies (SCPs) restricting access to the S3 bucket.
After making these changes, try running your Athena query again. If you continue to experience issues, you may need to consult with your AWS administrator or the team responsible for managing IAM permissions in your organization to ensure that the correct access is granted.
Sources
Access Denied for ATHENA | AWS re:Post
IAM Permission issue | AWS re:Post
Error: User not authorised to perform kms on AWS KMS Resource in Amazon S3 in my CodePipeline Codedeploy | AWS re:Post
Relevant content
- asked 4 years ago
- AWS OFFICIALUpdated 3 months ago
