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.
{
"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.
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.
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.
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": "*"
}
]
}
Consult with AWS experts to implement the following points into the IAM policy:
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
005461119

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.