Suboptimal Lifecycle Policy for Small Files on an S3 Bucket
Service Category
Storage
Cloud Provider
AWS
Service Name
AWS S3
Inefficiency Type
Inefficient Configuration
Explanation

This inefficiency occurs when small files are stored in S3 storage classes that impose a minimum object size charge, resulting in unnecessary costs. Small files under 128 KB stored in Glacier Instant Retrieval, Standard-IA, or One Zone-IA are billed as if they were 128 KB. If these small files are accessed frequently, S3 Standard may be a better fit. For infrequently accessed small files, transitioning them to archival storage classes like Glacier Flexible Retrieval or Deep Archive can optimize storage spend. Poorly tuned lifecycle policies often allow small files to remain in suboptimal storage classes indefinitely.

Relevant Billing Model

S3 storage is billed per GB stored per month, but for certain storage classes like Glacier Instant Retrieval, Standard-IA, and One Zone-IA, a minimum object size charge of 128 KB applies. Even if an object is smaller than 128 KB, billing treats it as if it were 128 KB. This means small files stored in these classes may incur disproportionately high costs compared to larger files. Choosing the right storage class is crucial to avoid unnecessary charges.

Detection
  • Review if the bucket contains a high proportion of small objects (e.g., under 128 KB)
  • Evaluate whether these small objects are stored in Glacier Instant Retrieval, Standard-IA, or One Zone-IA storage classes
  • Assess the access patterns of the small files to determine if frequent retrieval justifies Standard storage
  • Check if lifecycle policies exist to transition small, infrequently accessed files to lower-cost archival classes
  • Confirm whether the current storage configuration aligns with cost optimization goals for object size and access frequency
Remediation

Move frequently accessed small objects to S3 Standard to avoid minimum size penalties. Transition infrequently accessed small objects to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive through updated lifecycle policies. Implement automated lifecycle rules based on object size and last access time to proactively manage small object storage. Periodically audit buckets for small object distribution and adjust policies as data patterns change over time.