aws_ s3_ object cost estimation
An S3 object is billed for the bytes it stores at its storage class rate, plus the request to upload it, so cost scales with object size and how many objects you keep.
An aws_
The charges on an object are three: storage per GB-month for as long as it exists (about $0.023/GB-month on S3 Standard), a request charge when it is uploaded (a PUT is about $0.005 per 1,000), and, if it is ever downloaded out of AWS, data transfer egress. Storage class matters: the same bytes cost far less on Standard-IA or Glacier, though those classes add retrieval costs and minimum durations. If the bucket uses SSE-KMS, each object upload also triggers a KMS request charge.
Using aws_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_s3_object" "config" {
bucket = aws_s3_bucket.assets.id
key = "config/app.json"
source = "${path.module}/files/app.json"
etag = filemd5("${path.module}/files/app.json")
storage_class = "STANDARD"
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Object storage | per GB-month | The bytes the object stores, billed at its storage class rate for as long as it exists. S3 Standard: $0.023/GB-month |
| Upload request | per 1,000 requests | Each PUT or COPY that writes the object incurs a request charge. PUT: $0.005/1,000 |
| Egress on download | per GB | Data transfer out of AWS when the object is downloaded to the internet. First 10 TB: ~$0.09/GB |
Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Pick the right storage class
Up to 95% for cold objectsObjects that are written once and rarely read cost far less on Standard-IA or Glacier. Set storage_
Do not store large binaries in Terraform state
Managing many large objects with aws_
Compress before upload
Storage and egress are billed per GB. Compressing text, logs, and JSON before uploading reduces both the stored bytes and any download transfer cost.
FAQ
Does an S3 object cost money?
Yes. An object stores real bytes billed per GB-month at its storage class rate, plus a small request charge to upload it and egress if it is downloaded out of AWS. Tiny objects round to near zero.
How is the cost of an S3 object calculated?
Storage is size times the per GB-month rate for its storage class (about $0.023 on Standard). Add the PUT request charge on upload and any egress on download. Storage is the dominant cost for large or long-lived objects.
How do I make S3 objects cheaper?
Store cold objects in Standard-IA or Glacier, compress data before upload, and use lifecycle rules to expire objects you no longer need so you stop paying storage for them.
Related resources
More AWS 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_.