Loading

Error "PERMISSION_DENIED" When Amazon Athena Query Executed from Tableau Cloud Under IAM Policy IP Restrictions

Julkaisupäivä: Oct 6, 2026
Kuvaus

The connection between Amazon Athena and Amazon S3 fails, causing Tableau Cloud errors when the IAM user that Tableau Cloud uses to connect to Amazon Athena has these conditions applied.

  • IAM policies allows the necessary actions for Amazon Athena, Amazon S3, and AWS Glue.
  • Another IAM policy attached to the same IAM user explicitly denies ("Effect": "Deny") all actions ("Action": "*") from any source IP other than a specific source IP. So in this case, it means source IP addresses such as Tableau Cloud.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "*",
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": [
                        "141.163.208.0/23"
                    ]
                }
            },
            "Resource": "*"
        }
    ]
}

 

When executing queries via live connections or extract refreshes for data sources connected to Amazon Athena, Tableau Cloud outputs the following error messages:

[Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. PERMISSION_DENIED: User: arn:aws:iam::<AccountID>:user/<IAM User> is not authorized to perform: s3:GetObject on resource: "arn:aws:s3:::<Bucket Name>/..." with an explicit deny in an identity-based policy: arn:aws:iam::<AccountID>:policy/<Policy Name> (Service: S3, Status Code: 403 ...)

Depending on your order of operations, the details of the error message may vary.


Cause:

AWS documentation states that requests from Athena to Amazon S3 are sent from a private IPv4 address. Under a policy that denies communication with IPs other than specific public IPs, these communications are also blocked, resulting in an error.

For more information, see the AWS documentation: Control access to Amazon S3 from Athena.

Ratkaisu

Work with your AWS or IT administrator to modify the IAM policy settings so private communication between Amazon Athena and Amazon S3 is not blocked by IP restrictions.

Policy modification approaches

Option 1

Use the aws:ViaAWSService key in the statement blocking non-specified public IPs to allow internal traffic.
Note that since this condition is added to a Deny statement, the value of aws:ViaAWSService must be set to false.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Action": "*",
            "Condition": {
                "NotIpAddress": {
                    "aws:SourceIp": [
                        "141.163.208.0/23"
                    ]
                },
                "Bool": {
                    "aws:ViaAWSService": "false"
                }
            },
            "Resource": "*"
        }
    ]
}

 

Option 2

Consult with AWS experts to implement the following points into the IAM policy:

  • Allow specific IP addresses in the policies for Amazon Athena and AWS Glue.
  • Allow access from Amazon Athena and AWS Glue to Amazon S3.

 

Lisäresurssit

Control access to Amazon S3 from Athena - Amazon Athena
https://docs.aws.amazon.com/athena/latest/ug/s3-permissions.html

 

AWS global condition context keys - AWS Identity and Access Management
aws:ViaAWSService
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-viaawsservice

 

Knowledge-artikkelin numero

005461119

 
Ladataan
Salesforce Help | Article