HomeBlogComparison

Amazon S3 vs HDFS: Why Hadoop Clusters on AWS Keep Their Data in S3 and Use HDFS as Scratch Space

A white robot moves a glowing file cube from three color coded storage shelves into a fast access tray

Amazon S3 is object storage you rent by the gigabyte that keeps your data whether or not any cluster is running; HDFS (the Hadoop Distributed File System) is a file system a Hadoop cluster builds out of its own nodes' disks, fast for jobs running on those nodes but only as durable as the cluster you keep paying for. For a company of 10 to 250 people that runs Spark or Hadoop jobs occasionally, the practical answer is to keep the data in S3 and treat HDFS as scratch space inside a cluster you switch off.

Where do the files live when the cluster is switched off?

That question settles most of the comparison. The Apache HDFS design guide describes a NameNode that holds "all HDFS metadata" and DataNodes that store the blocks, with files written once and read many times and computation moved next to the data because that is "much more efficient." It describes blocks copied to several DataNodes, using a replication factor of three as its example. All of that disk belongs to the cluster.

Amazon's own Hadoop service draws the line plainly. The Amazon EMR file systems page says HDFS on an EMR cluster is fast but "ephemeral storage which is reclaimed when the cluster ends" and is "best used for caching the results produced by intermediate job-flow steps." Data that must outlive the job goes to S3 through the S3A connector, which EMR uses for s3:// paths from release 7.10.0.

The practical differences

QuestionAmazon S3HDFS
What it isA managed object store: buckets, keys and objectsA distributed file system made from the cluster's own disks
Survives the cluster being deletedYes; storage is billed separately from computeNo, unless you keep the nodes (and their disks) running
RedundancyDesigned for 99.999999999% durability, per AWS's storage classes pageCopies of each block on several nodes; you pay for every copy in raw disk
ConsistencyStrong read-after-write for object PUT and DELETE, per the S3 user guideA real file system with a single metadata authority
Renames and directoriesDirectories are mimicked; renames are copies and are not atomicNative, fast renames and listings
Who runs itAWSWhoever runs the cluster: patching, disk failures, NameNode availability
Cheaper tiers for old dataInfrequent access and Glacier storage classes with lifecycle rulesStorage policies can move cold blocks to denser archive disks, but only disks you buy and run

What S3 does not do the way HDFS does

The Hadoop project's own S3A connector documentation lists the catches, and they are real. Directories are imitated, "the time to rename a directory is proportional to the number of files underneath it," directory renames and deletes "can fail partway through," and listing can be slow. That is why Spark and Hive jobs writing to S3 should use the S3A committers rather than the old write-to-a-temporary-folder-then-rename pattern that HDFS made cheap. If a vendor's analytics tool was built for HDFS and assumes atomic renames, test it against S3 before you move.

Pricing 20 TB both ways

This example is illustrative and uses AWS list prices for US East (N. Virginia) as of December 2026 from the S3 pricing page and the EBS pricing page. A firm keeps 20 TB of historical transaction and sensor data and runs a reporting job twice a week.

  • In S3 Standard: 20,480 GB at $0.023 per GB-month is about $471 a month. The cluster runs only during the jobs, and its hourly cost stops when it is terminated.
  • In HDFS on EC2 with gp3 EBS disks: three copies of 20 TB need about 60 TB of raw disk. At $0.08 per GB-month that is about $4,915 a month for the disks alone, before the instances that must stay running to keep the file system alive.

Moving older years to S3 Standard-IA ($0.0125 per GB-month plus $0.01 per GB retrieved) or an archive class lowers the S3 figure further; HDFS can only move cold blocks to cheaper disks you add to the cluster yourself. What would change the answer: jobs that run around the clock on the same hot data, where a permanent cluster is paid for anyway and local disk speed matters more than storage cost.

Amazon S3 vs Hadoop: is that the same question?

Mostly. Hadoop is the whole framework: HDFS for storage, YARN for scheduling and MapReduce or Spark for processing. S3 replaces only the storage layer. People who search "Amazon S3 vs Hadoop" usually mean "can S3 replace our Hadoop cluster?", and the answer is that S3 replaces HDFS as the place the data lives, while you still need something to process it: an EMR cluster that starts for the job, Amazon Athena for SQL queries, or a warehouse. Our Amazon EC2 vs EMR post explains what EMR adds on top of plain servers, and Amazon EMR vs Azure Databricks prices a nightly Spark job.

When keeping HDFS still makes sense

  • An on-premises cluster that is already paid for and has years of hardware life left. Moving the data out adds egress and engineering time for no new capability.
  • Jobs dominated by many small renames or directory operations, which S3 handles slowly.
  • Intermediate results between job stages, which is exactly what EMR recommends HDFS for.

If you are weighing self-hosted object storage instead of a cluster file system, see Ceph vs Amazon S3. For other S3 comparisons, Amazon S3 Vectors vs OpenSearch covers AI search indexes and Amazon S3 vs Vimeo covers video. NetSys AWS consulting plans data lake storage and the cluster lifecycle around it; to have your layout checked, Review my storage design.

More on this topic: Storage and files guides.

Frequently asked questions

Amazon S3 vs HDFS: which is faster?

HDFS on local disks is usually faster for jobs running on the same nodes, and its renames and listings are native. S3 is slower for directory-heavy work but scales without a cluster. AWS's EMR documentation recommends HDFS for intermediate results and S3 for data that must persist.

Amazon S3 vs Hadoop: can S3 replace Hadoop?

S3 can replace HDFS, the storage part of Hadoop. You still need a processing engine such as Spark on Amazon EMR, Athena for SQL, or a data warehouse. Many teams keep Hadoop-style processing and move only the data to S3.

Is data in HDFS lost when an EMR cluster terminates?

Yes. AWS describes HDFS on EMR as ephemeral storage that is reclaimed when the cluster ends. Write anything you need to keep to S3 before the cluster shuts down.

Why is renaming a folder slow on S3?

S3 has no real directories. The Hadoop S3A documentation explains that a directory rename copies every file underneath it, so the time grows with the number of files, and the operation is not atomic.

Sources

Read on December 2, 2026:

AWS Consulting for Business

Discuss AWS Consulting for Business for your business.

Tell us about your current systems, the result you need and your timeline. We will discuss the work, responsibilities and pricing before you decide on an engagement.

Explore AWS Consulting for Business 845-203-3914