AWS Data Engineer DEA-C01 · Data Store Management · medium

An IoT ingestion pipeline writes 50,000 tiny 4 KB JSON files per hour into an Amazon S3 partition (200 MB total per hour). When analysts query this partition in Amazon Athena, queries take 45 seconds instead of 2 seconds due to S3 LIST and GET request overhead and metadata parsing across hundreds of thousands of tiny files. How should you resolve this small-file problem?

Published · Last updated · checked before publication — how we verify questions

Options

  • ASplit each 4 KB file into four 1 KB files across more prefixes
  • BMove the 4 KB files to S3 Glacier Flexible Retrieval storage
  • CDisable partition pruning in the AWS Glue Data Catalog table
  • DCompact small files into 128 MB+ Parquet files via Glue or IcebergCorrect answer

Answer: D. Compact small files into 128 MB+ Parquet files via Glue or Iceberg

Running a periodic compaction job (using AWS Glue ETL, Amazon EMR, Athena CTAS, or Iceberg automatic compaction) merges thousands of tiny 4 KB JSON files into larger (e.g., 128 MB–512 MB) columnar Apache Parquet files, eliminating S3 API overhead and enabling vectorized columnar reads.

Why the other options are wrong

  • A. Split each 4 KB file into four 1 KB files across more prefixes — Creating even smaller 1 KB files worsens S3 LIST/GET metadata overhead in Athena.
  • B. Move the 4 KB files to S3 Glacier Flexible Retrieval storage — Athena cannot directly query archived S3 Glacier Flexible Retrieval objects without restoring them first.
  • C. Disable partition pruning in the AWS Glue Data Catalog table — Disabling partition pruning forces Athena to scan even more small files across all dates.

All Data Store Management questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.