Home icon

Understand Amazon S3 data transfer costs by classifying requests with Amazon Athena

Storage Blog



This article provides a solution for analyzing Amazon S3 data transfer costs by classifying requests using Amazon Athena.

Specifically, the article covers:

  • Filtering out requests that don't incur data transfer costs, such as transfers within the same AWS Region, transfers to CloudFront, and transfers from other AWS services
  • Using a Python script to generate an Athena SQL query that filters out internal IP ranges and CloudFront IPs
  • Enabling Athena Engine version 3 to run the generated query
  • Executing the Athena query on S3 access logs to get requests that incur data transfer costs
  • Further analysis techniques on the filtered requests, such as grouping by IP or requester
  • Conclusion: This solution helps identify sources of data transfer costs for optimization


Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Jun 24
2022
Understanding data transfer costs for AWS container services
Aug 15
2025
Transform your data to Amazon S3 Tables with Amazon Athena
Aug 16
2019
Amazon Athena now supports querying data from Amazon S3 Requester Pays Buckets
Dec 16
2024
Analyzing Amazon S3 Metadata with Amazon Athena and Amazon QuickSight

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.