awsefsebss3storagecost-optimization

EFS vs EBS vs S3 cost: pick by access pattern, not the per-GB rate

S3 (~$0.023/GB) is cheapest, EBS (~$0.08) middle, EFS (~$0.30) priciest — but they're not interchangeable. Here's how to match the service to the access pattern and avoid paying 13x by using EFS where S3 would do.

The C3X Team··6 min read

Quick answer

Per GB-month: S3 Standard ~$0.023 (cheapest), EBS gp3 ~$0.08, EFS Standard ~$0.30 (priciest). But they do different jobs — S3 is objects, EBS is block storage for one instance, EFS is a shared file system. Pick the cheapest service that fits the access pattern, then tier within it (S3 classes, EFS IA). The wrong choice is using EFS where S3 would do, at 13x the rate.

These three get compared on price, but they're not substitutes — the cost question only makes sense once you know which access pattern you have. The expensive mistake is reaching for EFS (a shared file system, priced like one) when the workload is really objects (S3) or a single instance's disk (EBS).

Three services, three jobs

  • EBS (~$0.08/GB gp3): block storage attached to one EC2 instance. Provisioned capacity — you pay for the volume size, used or not. A filesystem or database disk for a single instance. See aws_ebs_volume.
  • EFS (~$0.30/GB Standard): a managed NFS file system many instances mount at once. Elastic — you pay for what you store, no provisioning. Shared state, content, home dirs. See aws_efs_file_system.
  • S3 (~$0.023/GB Standard): object storage over HTTP, accessible anywhere. Objects, backups, static assets, data lakes — not a filesystem. See aws_s3_bucket.

Pick by access pattern, then tier

  1. One instance needs a disk → EBS gp3 (not gp2 — see the gp3 migration).
  2. Many instances share files → EFS, with Infrequent Access lifecycle (~$0.16/GB) for cold files.
  3. Objects / backups / static content → S3, with the right storage class.

The EFS-where-S3-would-do trap

EFS is the priciest per GB by a wide margin, and it's tempting because it "just works" as a mounted directory. But storing logs, backups, or static assets on EFS at $0.30/GB when S3 would hold them at $0.023/GB is a 13x overpay for data that didn't need a shared POSIX filesystem. Reserve EFS for genuine concurrent multi-instance file access; push everything else to S3 or keep it on the instance's EBS volume.

FAQ

Which is cheapest: EFS, EBS, or S3?

Per GB-month, S3 Standard (~$0.023) is cheapest, EBS gp3 (~$0.08) is in the middle, and EFS Standard (~$0.30) is the most expensive. But they're not interchangeable — S3 is object storage, EBS is block storage for one instance, EFS is a shared file system. The cheapest one that fits your access pattern is the right answer, not the lowest rate.

When should I use EFS despite the higher cost?

When multiple instances need to read and write the same files concurrently — shared application state, content directories, home directories, CI artifacts across a fleet. EBS attaches to one instance; S3 isn't a file system. EFS's premium buys POSIX shared access and elastic capacity that neither alternative provides.

What's the difference between EBS and S3 for cost?

EBS is provisioned block storage billed for allocated capacity (a 500 GB gp3 volume costs for 500 GB even if half-empty) and attaches to a single EC2 instance. S3 is object storage billed for stored bytes plus request fees, accessible over HTTP from anywhere. EBS is for a filesystem on one instance; S3 is for objects, backups, and static content.

Does EFS have cheaper tiers?

Yes. EFS Infrequent Access (~$0.16/GB) and Archive tiers cost far less than Standard, and lifecycle management moves files there automatically after a period without access. For shared file systems where most data is cold, lifecycle policies cut the EFS bill substantially.

How do I pick the right storage service?

Single instance needs a fast local filesystem → EBS. Many instances need to share files → EFS (with IA lifecycle). Objects, backups, static assets, data lake → S3 (with the right storage class). Matching the service to the access pattern, then tiering within it, is where the savings are.

How does C3X estimate storage cost?

C3X prices aws_ebs_volume, aws_efs_file_system, and aws_s3_bucket from their configuration, so you can compare the three for a given capacity and see the cost difference before choosing where data lives.

What to do next

Decide by pattern, then check the number. C3X prices aws_ebs_volume, aws_efs_file_system, and aws_s3_bucket from your Terraform, so the cost difference for a given capacity is concrete before you commit data to the wrong tier. The quickstart runs it in minutes.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.