aws_s3_bucket cost estimation
Object storage on S3. Priced by storage class, request count, and data transfer, with the bucket itself being free.
An aws_s3_bucket is a container for objects in S3. The bucket itself has no cost. Charges come from three places.
First, storage. Every object is billed per GB-month at a rate that depends on the storage class (Standard, Intelligent-Tiering, Standard-IA, One Zone-IA, Glacier Instant Retrieval, Glacier Flexible Retrieval, Glacier Deep Archive). Standard is the default and most expensive at roughly $0.023/GB-month. Glacier Deep Archive is the cheapest at roughly $0.00099/GB-month but has 12-hour retrieval times.
Second, requests. Every PUT, COPY, POST, LIST, GET, and HEAD operation is billed per 1,000 requests, with different rates by storage class. PUTs cost roughly 10x what GETs do. This matters for chatty workloads: a log ingestion pipeline that PUTs millions of small objects pays more in request fees than storage.
Third, data transfer. Bytes leaving S3 to the public internet incur egress charges (first 100 GB/month free at the account level). Bytes leaving S3 to another AWS region also have a charge. In-region transfers to other AWS services are free.
c3x reads the bucket configuration including lifecycle rules and replication. Object counts, sizes, and request rates are usage-based and require c3x-usage.yml to model accurately.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_s3_bucket" "logs" {
bucket = "production-logs"
}
resource "aws_s3_bucket_lifecycle_configuration" "logs" {
bucket = aws_s3_bucket.logs.id
rule {
id = "archive-old-logs"
status = "Enabled"
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 90
storage_class = "GLACIER"
}
expiration {
days = 365
}
}
}Pricing dimensions
What you actually pay for when you provision aws_s3_bucket.
| Dimension | Unit | What's being charged |
|---|---|---|
| Storage | per GB-month | Provisioned storage in each storage class. Lifecycle rules can move objects between classes automatically. $0.023/GB-month for Standard in us-east-1 |
| PUT/COPY/POST/LIST requests | per 1,000 requests | Mutating operations and listing. Significantly pricier than reads. $0.005 per 1,000 PUTs in Standard |
| GET/HEAD/SELECT requests | per 1,000 requests | Reads, metadata fetches, and Select queries. $0.0004 per 1,000 GETs in Standard |
| Data transfer out to internet | per GB | Egress to the public internet. First 100 GB/month free at the account level. $0.09/GB for the first 10 TB/month |
| Cross-region replication | per GB transferred | If aws_s3_bucket_replication_configuration is set, replicated bytes are billed at the cross-region transfer rate. |
| Glacier retrievals | per GB and per request | Objects in Glacier classes have separate per-GB and per-request retrieval charges. Vary by retrieval tier (Expedited, Standard, Bulk). |
Optimization tips
Common ways to reduce aws_s3_bucket cost without changing the workload.
Move logs and backups to Intelligent-Tiering or Glacier
45-95%Standard storage is rarely worth it for objects accessed less than once a month. A lifecycle rule that transitions to Standard-IA after 30 days saves 45%, and Glacier Deep Archive after 90 days saves 95%.
Use S3 Intelligent-Tiering for unpredictable access patterns
Up to 70% for cold objectsIntelligent-Tiering automatically moves objects between frequent and infrequent access tiers based on actual usage. No retrieval fees. A small per-object monitoring charge applies.
Batch small objects before writing
Up to 99% on request feesA pipeline that PUTs 10M tiny objects pays $50/month in PUT fees alone. Concatenating into 100K larger objects cuts request costs by 100x without affecting storage.
Use CloudFront for repeated public reads
Workload-dependentIf the same objects are read many times by internet users, CloudFront caches them at the edge and reduces S3 GET requests and egress to near zero.
FAQ
Why is my S3 bucket showing $0 cost in c3x estimate?
S3 buckets themselves are free. Storage, requests, and egress are all usage-based. Add expected sizes and request counts to c3x-usage.yml under aws_s3_bucket and the estimate will populate.
How does c3x handle lifecycle rules in cost estimates?
c3x reads aws_s3_bucket_lifecycle_configuration and shifts the storage class assumption for objects past the transition age. If you have a 30-day Standard-to-IA transition and specify 60 days of storage in the usage file, c3x bills 30 days at Standard and 30 days at Standard-IA.
What about S3 Express One Zone?
Express One Zone has a different pricing model with higher storage cost but cheaper requests. c3x supports it via the storage_class attribute. It's right for high-IOPS workloads needing single-digit-millisecond latency.
Are S3 management features like Inventory and Storage Lens billed separately?
Yes. S3 Inventory, Storage Lens, Replication, and Object Lock each have their own pricing dimensions. c3x estimates the ones declared in Terraform; some (like Storage Lens free tier) require usage-file entries to model.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_s3_bucket.