Restricting S3 Bucket Policies for Inbound Traffic from Athena
Lv200
Lv200
In this session, we explore how to analyze S3 bucket data using Athena, specifically for buckets restricted to access from a designated VPC.
The analysis environment and data storage are in separate accounts, and S3 access from the specific VPC is through a Gateway endpoint.
Athena is used for analyzing S3 server access logs, with internet access facilitated via a NAT Gateway.
# Bucket Policy: Methods to Control Athena Traffic
## Option 1: Control by Global IP (Adopted)
Using global IP control, we ensured that access is restricted to the VPC.
## Option 2: Control Athena Traffic with "aws
Condition Key" (Not Adopted)
This method failed to enforce IP restrictions, requiring IAM user-based control, which increases operational burden. Hence, it was not adopted.
### Unsuccessful Method
Using VPC ID or VPC Endpoint ID in the bucket policy for Athena control was not feasible.
©JAWS-UG (AWS User Group - Japan). All rights reserved.