# Unmanaged growth of Athena query output buckets

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/unmanaged-growth-of-athena-query-output-buckets

When a workgroup writes results to a customer-managed S3 location, Athena generates a new S3 object for every query result, regardless of whether the...

By: Abdeldjallil Koutchoukali

Updated: 2026-09-28

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

# Unmanaged Growth of Athena Query Output Buckets

The short version

When a workgroup writes results to a customer-managed S3 location, Athena generates a new S3 object for every query result, regardless of whether the output is needed long term.

[Abdeldjallil Koutchoukali](https://www.linkedin.com/in/abdeldjalil-koutchoukali/)

Lead Consultant FinOps @ Devoteam

AWS service

[AWS Athena](https://www.pointfive.co/efficiency-hub/cloud-services/aws-athena)

Category

[Storage](https://www.pointfive.co/efficiency-hub/service-category/storage)

Reference

CER-0136

Type

Excessive Data Retention

## Explanation

Why the waste happens and who it affects.

Over time, this leads to uncontrolled growth of the output bucket, especially in environments with repetitive queries such as cost and usage reporting. Many of these files are transient and provide little value once the query is consumed. Without lifecycle rules, organizations pay for unnecessary storage and create clutter in S3.

## Billing model

The pricing dimensions that drive this cost.

Athena query execution is billed per terabyte of data scanned, but query results written to a customer-managed S3 output location are billed according to S3 storage pricing (Athena managed query results are kept for 24 hours at no charge). Each executed query produces an object in the output bucket, and costs accumulate as these objects persist over time without automated cleanup.

## How to detect

5 checks to find it in your estate.

- Review whether Athena query output buckets have lifecycle rules configured to delete or transition old objects

- Check whether workgroups still use a customer-managed S3 output location rather than Athena managed query results

- Assess growth trends in the S3 bucket size used for Athena outputs relative to actual business need

- Check for repetitive or automated queries (e.g., CUR queries) that generate large volumes of transient results

- Confirm whether audit, compliance, or reporting requirements justify long-term retention of certain outputs

## How to fix

4 ways to remove the waste.

- Implement S3 Lifecycle Policies on Athena output buckets to automatically expire objects after a set period (e.g., 30, 60, 90 days)

- Switch workgroups that do not need long-term result retention to Athena managed query results, which need no customer S3 bucket, are stored at no cost for 24 hours and are then deleted automatically

- Use prefixes or tags to differentiate between temporary query outputs and long-term reports, applying tailored retention rules

- Regularly review and adjust retention policies to balance cost efficiency with business and compliance needs

## Documentation

Vendor references for pricing and configuration.

- [Managed query results  docs.aws.amazon.com](https://docs.aws.amazon.com/athena/latest/ug/managed-results.html)

- [Work with query results and recent queries  docs.aws.amazon.com](https://docs.aws.amazon.com/athena/latest/ug/querying.html)

- [Managing the lifecycle of objects  docs.aws.amazon.com](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html)

- [Amazon Athena pricing  aws.amazon.com](https://aws.amazon.com/athena/pricing/)

## Related inefficiencies

[Browse the library](https://www.pointfive.co/efficiency-hub)

- AWS Athena  CER-0188

### [Inefficient File Format and Layout for Athena Queries](https://www.pointfive.co/efficiency-hub/inefficiencies/inefficient-file-format-and-layout-for-athena-queries)

Storing raw JSON or CSV files in S3 - especially when written frequently in small batches-leads to excessive scan costs in Athena. These formats are row-based and verbose, requiring Athena to scan and parse the full content even when only...

Compute

- AWS S3  CER-0237

### [Unexpired Non-Current Object Versions in S3](https://www.pointfive.co/efficiency-hub/inefficiencies/unexpired-non-current-object-versions-in-s3)

When S3 versioning is enabled but no lifecycle rules are defined for non-current objects, outdated versions accumulate indefinitely. These non-current versions are rarely accessed but continue to incur storage charges. Over time, this...

Storage

- AWS EFS  CER-0190

### [Missing Intelligent-Tiering on EFS Lifecycle Policy](https://www.pointfive.co/efficiency-hub/inefficiencies/missing-intelligent-tiering-on-efs-lifecycle-policy)

EFS offers lifecycle policies that transition files from the Standard tier to Infrequent Access (IA) based on inactivity, significantly reducing storage costs for cold data. When this feature is not enabled, infrequently accessed files...

Storage

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

