Skip to content
Notifications
Clear all

TIL: You can set S3 Intelligent-Tiering at the bucket level. Saved 25%.

1 Posts
1 Users
0 Reactions
0 Views
(@emilyr)
Reputable Member
Joined: 3 weeks ago
Posts: 158
Topic starter   [#24720]

While conducting a routine audit of our cloud storage costs this quarter, I identified a recurring pattern of inefficiency within our S3 storage strategy. A significant portion of our data, primarily comprising processed logs, archived user documents, and infrequently accessed application assets, was residing in the Standard storage class. The access patterns for these objects were highly irregular, with a small subset being retrieved monthly for analytics, while the majority remained untouched for periods exceeding 90 days. This presented a classic use case for storage tiering, but the operational overhead of manually managing lifecycle policies based on imperfect access predictions was a deterrent.

The pivotal realization was that S3 Intelligent-Tiering could be applied as a default storage class at the bucket level, eliminating the need for object-level configuration or complex lifecycle rules. This setting automatically monitors access patterns and moves objects between two optimized tiers: a Frequent Access tier and an Infrequent Access tier. After 90 consecutive days without access, objects are moved to the Infrequent Access tier, which offers lower storage costs. Crucially, there are no retrieval fees or performance penalties when objects in the Infrequent Access tier are accessed; they are simply moved back to the Frequent Access tier.

Implementing this was a straightforward bucket policy update. The key is to define the `IntelligentTieringConfiguration` with the necessary transitions. Below is the Terraform configuration we used, which can be adapted for AWS CLI or the Console.

```hcl
resource "aws_s3_bucket" "application_archive" {
bucket = "app-archive-data"

lifecycle {
prevent_destroy = true
}
}

resource "aws_s3_bucket_intelligent_tiering_configuration" "archive_tiering" {
bucket = aws_s3_bucket.application_archive.bucket
name = "EntireBucketTiering"

tiering {
access_tier = "DEEP_ARCHIVE_ACCESS"
days = 180
}

tiering {
access_tier = "ARCHIVE_ACCESS"
days = 90
}

status = "Enabled"
}

resource "aws_s3_bucket_lifecycle_configuration" "default_intelligent_tiering" {
bucket = aws_s3_bucket.application_archive.bucket

rule {
id = "default-intelligent-tiering"
status = "Enabled"

transition {
storage_class = "INTELLIGENT_TIERING"
}

abort_incomplete_multipart_upload {
days_after_initiation = 7
}
}
}
```

The financial impact was immediate and measurable. In the first full month post-implementation, we observed a **25% reduction** in our S3 storage costs for the targeted buckets, which accounted for approximately 15% of our total AWS bill. This was calculated by comparing the monthly S3 line item from the AWS Cost Explorer for the three months prior to the change against the month following. The cost per gigabyte-month for data in the Infrequent Access tier is approximately 40% lower than the Standard tier, and as more data aged into this tier, the savings compounded.

Important considerations for this approach:
* **Monitoring Overhead:** Intelligent-Tiering itself incurs a small monthly monitoring and automation fee per object. For buckets with many small objects, a cost-benefit analysis is recommended. In our case, the storage cost savings vastly outweighed this fee.
* **Data Access Patterns:** This strategy is optimal for data with unknown, changing, or unpredictable access patterns. For data with a known, fixed lifecycle (e.g., raw logs deleted after 365 days), a traditional lifecycle policy to S3 Glacier might be more cost-effective.
* **Transition Timing:** The automatic move to the Infrequent Access tier only occurs after 90 consecutive days of no access. Data accessed even once during that period resets the timer.

This exercise reinforced the principle that cloud cost optimization is often less about radical architectural change and more about systematically applying the appropriate, managed services to well-understood workloads. The bucket-level Intelligent-Tiering configuration is a set-and-forget improvement that aligns cost directly with actual usage.



   
Quote