# S3 data lake design: zones, file formats, partitions and Iceberg

> How to lay out an S3 data lake: raw, clean and curated zones with Glue jobs between them, Parquet and compression, partitioning and small files, Apache Iceberg and Amazon S3 Tables, plus encryption, versioning, lifecycle and access points.

## Key takeaways

- Three zones, one bucket each: raw as it arrived, clean as validated Parquet, curated as tables shaped for use.
- Write compressed columnar files of hundreds of megabytes, not thousands of tiny ones.
- Use Apache Iceberg for data that changes. S3 Tables runs the compaction and clean-up for you.
- Encrypt with KMS, version the raw bucket, and let lifecycle rules handle age.

[Open this diagram in archhy](https://archhy.com/app#d=N4IgLglmA2CmIC4QGUDMACAJgQzN902A1rAugE7YDuANOgMZzYB26LmDArpWLBwF4B7ZrADO6KlAAW6AOLROsNsw4BJerABGscgHMQNEIQCegzmAAiEcrHqRhiEABkASgZABbWHkShd0QU1saFFfEFEpQSoAOUFMWAAVYwAHMUQwckVDCFFkZmxkgFF8zThMdMzYQ11yCExkCH54BAAmAAZDKWCAM1lazBdsCBDEbuDRKpBKYeQwYzhHRlgWd2SIO25m0EgYZozFAF8jw2Y4tIQAbVA6x1EM5Y9Qw0JtaEdCgDdYZjB0O5tsI93HNUo5ZN8dOtkDoPut4IYJuRYRpHNRRAB6IgQESiHIAWhweDx-weTyM2FM5jCAA9EHiAIztQzGRD0gAsHRAkkwYCkrIAbJypLAILopGBWfS2sdruUkJhNGSXrA3kgAPKpHgQYTBLC4bBBCbidjobrDJSYciCZJkkHNEAWfWG+HkykShCgWkIBlMkAshCoDmGbm8xDtIUisXu+lSmUgG5IFjBYx3JUGlWOACC+WgKbAxpU6AAQqp0GBBIIRoY7Y4AKqI9wmMzuz1h1C+-3szkhvkIemCzqR8WS6UHGiy1FUNOvLMAdWQ6AAwgFOOVqyl7Zn58uzGvXc2aWGO4hu3VQ602r7haLhwgABwDkD8VQqWBehltT9xhNTWC6bXMI26aqiALh-gBwIbo4YH-g4hjJNgNg-KocogGiQFuoeF7MogQZcmevb0gAnHeEY3u6pGjuO8aodiuhiBKzzAY4L70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V2A7xIe6DAlDubBNucqxt6rW26vHehu1-zxGDvNd7bDtrZ2QCdci2pm7pKh0gAKTSiBiLZbFAoSkfM6BYAM2NpUvLIh5vHO4T9yscG7P-cB8DrtoP83g-W7uqHh36u7ca0jsjcnUenfC5dqLOOMd46he8obfsRtB1lsgUerBhC5nQCIPgGseXzOYCylbYPC0ef3TV5H4QQthZF9Do7BHqMXa6zL3rt3ExfMV6Ov2j25FpxywQCsRAh7vfp59ori3SuodN+5qrFv7enpO-DvAiP7cPsd1Ll32O3e46Y-a5MqZ7sK+wHI5AfyYMs9syAQVwrRUg4Ezzs3cevNi+25R6h+20++cIxj53WOesHCxQcIAA)

An S3 data lake is mostly a set of conventions. S3 stores anything; whether the lake is cheap to query and easy to trust depends on bucket layout, file formats, partitioning and table formats such as Apache Iceberg. This post draws an AWS S3 data lake with raw, clean and curated zones and AWS Glue jobs between them. It is part of our Data on AWS series; the governed overview is [AWS data lake architecture with Lake Formation and Glue](https://archhy.com/blog/aws-data-lake-architecture).

## The problem: a bucket is not a lake

Most lakes start as one bucket with folders named after whoever made them. Files arrive as CSV and JSON in every size, nobody knows which copy is clean, and queries scan everything. The cure is a few rules, agreed early.

## The design

Read the diagram left to right ([open the diagram](https://archhy.com/app#d=N4IgLglmA2CmIC4QGUDMACAJgQzN902A1rAugE7YDuANOgMZzYB26LmDArpWLBwF4B7ZrADO6KlAAW6AOLROsNsw4BJerABGscgHMQNEIQCegzmAAiEcrHqRhiEABkASgZABbWHkShd0QU1saFFfEFEpQSoAOUFMWAAVYwAHMUQwckVDCFFkZmxkgFF8zThMdMzYQ11yCExkCH54BAAmAAZDKWCAM1lazBdsCBDEbuDRKpBKYeQwYzhHRlgWd2SIO25m0EgYZozFAF8jw2Y4tIQAbVA6x1EM5Y9Qw0JtaEdCgDdYZjB0O5tsI93HNUo5ZN8dOtkDoPut4IYJuRYRpHNRRAB6IgQESiHIAWhweDx-weTyM2FM5jCAA9EHiAIztQzGRD0gAsHRAkkwYCkrIAbJyp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feIp9J3KhAjOvcvr10yowwsBE2HYCkZPWelaRHr3iftA+p9L6IBvvqHRr9lQf2lvYyqADUb-Y8DTdxxwi4VUeCgH8fINpIgpVg3ypA-KENIZdPxnt6G5Xbqw9wHDd68OSYveAK9JHcMBoo7AKjinlMfvo+pxjpbpHBFUax5jCs5EWDEBQiA2hxB4FKGkZ42JYCcMcDgCILa10ub7ZhkTnmxNBaQKehT0nAveeC1JFSv7DA0ZU5+51sANOLHwQlyNiww4GeDg6NLtRMvxxy0qfLhX5SU2FHxsraGKvCfCKJ2TtxH3WmBAFm9tXwB4la+WClHWlO0e6x2w4MXnGJclgNtRIGwR+PzI2ObhyuGnL3DZgV2A7xIe6DAlDubBNucqxt6rW26vHehu1-zxGDvNd7bDtrZ2QCdci2pm7pKh0gAKTSiBiLZbFAoSkfM6BYAM2NpUvLIh5vHO4T9yscG7P-cB8DrtoP83g-W7uqHh36u7ca0jsjcnUenfC5dqLOOMd46he8obfsRtB1lsgUerBhC5nQCIPgGseXzOYCylbYPC0ef3TV5H4QQthZF9Do7BHqMXa6zL3rt3ExfMV6Ov2j25FpxywQCsRAh7vfp59ori3SuodN+5qrFv7enpO-DvAiP7cPsd1Ll32O3e46Y-a5MqZ7sK+wHI5AfyYMs9syAQVwrRUg4Ezzs3cevNi+25R6h+20++cIxj53WOesHCxQcIAA)). Data lands in the raw zone, a Glue job validates it into the clean zone, a second job models it into the curated zone, and the Glue Data Catalog describes the tables that Amazon Athena queries.

### Zones: one bucket each

Use at least three zones, each in its own bucket. Names vary (raw, stage and analytics, or bronze, silver and gold); the rules matter more:

- **Raw.** Exactly what arrived, in its original format, with versioning on. You can always reprocess from here, so few people need to read it.
- **Clean.** Validated, de-duplicated, typed and converted to Parquet.
- **Curated.** Joined and aggregated for a purpose: a sales fact table, a customer dimension, a feature set.

Separate buckets give each zone its own policy, key, lifecycle rules and cost line. Inside each, keep one predictable prefix pattern, such as `sales/orders/dt=2026-11-25/`.

### File formats and compression

Keep the source format in raw: JSON, CSV or Avro. Avro suits records whose schema changes, because the schema travels with the data. From the clean zone on, write a columnar format. Parquet and ORC store data by column, so a query reads only the columns it needs, and their statistics let engines skip blocks. Compress everything: Snappy or ZSTD inside Parquet, gzip for raw text. A large gzipped CSV cannot be split across workers. Athena charges for the compressed bytes it scans, so format and compression are your biggest levers on query cost.

### Partitioning and small files

Partition by what most queries filter on, usually a date. Athena's guidance is to optimise for the common query, not the rare one: if people ask about days, don't partition by hour. Too many partition keys means too many small files, and every file is a request: listing thousands can take longer than reading the data. Aim for files of a few hundred megabytes: write bigger files in the first place where you can, and compact the rest.

### Open table formats: Iceberg, Hudi and Delta

Plain Parquet folders suit data that is only appended. Once rows change, use an open table format. Apache Iceberg, Apache Hudi and Delta Lake each add a metadata layer over Parquet files that gives transactions, row-level updates and deletes, schema evolution and time travel. AWS Glue 3.0 and later supports all three without extra connectors. On AWS, Iceberg has the widest support: Athena, Redshift, EMR, Firehose and S3 Tables all work with it, and partition evolution lets you change the layout later without rewriting queries.

Iceberg tables need upkeep: compacting small files, expiring old snapshots and deleting orphan files. In a general purpose bucket, the Glue Data Catalog can run all three as table optimisers, with binpack, sort or z-order compaction.

### Amazon S3 Tables

S3 Tables is a bucket type built for Iceberg. A table bucket holds tables rather than loose objects, and S3 does the upkeep itself: compaction to a target file size between 64 and 512 MB (512 by default), snapshot management and removal of unreferenced files, all on by default. It also offers Iceberg V3, record expiration, read-only replicas in other Regions or accounts, and Intelligent-Tiering chosen when a table is created. Access uses IAM in its own `s3tables` namespace, and the Glue Data Catalog integration makes tables visible to Athena, Redshift and EMR. We use it for the curated zone; raw files that are not tables stay in a general purpose bucket.

## Trade-offs, cost and security

- **Encryption.** New objects are encrypted with SSE-S3 by default. Use SSE-KMS with a customer managed key per zone to control who can decrypt, and turn on S3 Bucket Keys to cut KMS request costs. S3 Tables accepts only customer managed keys for SSE-KMS.
- **Versioning.** Turn it on in raw so an overwrite or delete can be undone. In curated, Iceberg snapshots already do that job.
- **Lifecycle.** Move ageing raw data to Standard-IA or a Glacier class, expire old versions, and use Intelligent-Tiering where access is unpredictable. Objects under 128 KB are never tiered: another cost of small files.
- **Access points.** Give each consuming team its own access point and policy, optionally VPC-only, instead of one ever-growing bucket policy.

## When not to use it

- A few gigabytes in one database: query the database, or use a warehouse.
- You need millisecond reads of single rows: a lake is built for scans, not lookups.
- Nobody will own the zones and catalogue: an unowned lake becomes a swamp.

## How to draw it in archhy

1. From the **Services** drawer, place an AWS Cloud and a Region, then dotted boundaries from the **Draw** drawer for Ingest, the S3 data lake, Catalogue and Query.
2. Place three S3 buckets in a row for the zones, with a Glue card below each gap. Search the AWS pack for Glue, Athena, Lake Formation and Key Management Service.
3. Use **Align** and **Space evenly** so the zones read left to right.
4. Colour the write rails green and the key and grant rails purple.
5. Give each bucket an info box with its format, partition key and lifecycle rule, then download a PNG for your data platform wiki.

Next in the Data on AWS series: a streaming data lake with Kinesis and Firehose, [an AWS Glue deep dive](https://archhy.com/blog/aws-glue-architecture-deep-dive), [ETL vs ELT on AWS](https://archhy.com/blog/etl-vs-elt-on-aws), [data lake vs warehouse vs lakehouse](https://archhy.com/blog/aws-data-lake-vs-data-warehouse-vs-lakehouse) and [Athena vs Redshift Spectrum vs Redshift](https://archhy.com/blog/athena-vs-redshift-spectrum-vs-redshift).

## Frequently asked questions

### What is an S3 data lake?

Data stored as files in Amazon S3, described in a catalogue such as the AWS Glue Data Catalog, and queried in place by engines such as Athena, Redshift Spectrum and EMR.

### Which file format should an S3 data lake use?

Keep the original format in the raw zone. From the clean zone on, use Parquet or ORC, compressed with Snappy or ZSTD, in files of a few hundred megabytes.

### What is the difference between S3 Tables and Iceberg in a normal bucket?

Both are Iceberg. In a general purpose bucket you run maintenance yourself or switch on Glue table optimisers. S3 Tables runs compaction, snapshot management and file clean-up for you, with access control per table.

### Do I need Iceberg for an S3 data lake?

No. Append-only data queried by date works well as partitioned Parquet. Iceberg earns its place when you update or delete rows, change schemas, or need consistent reads while jobs write.

*Based on:* Redrawn and discussed from [Building medallion architecture with Iceberg materialized views in Amazon SageMaker](https://aws.amazon.com/blogs/big-data/building-medallion-architecture-with-iceberg-materialized-views-in-amazon-sagemaker/) by Gaurav Sharma and Matt David (AWS Big Data Blog, 2 September 2026), whose bronze, silver and gold layers on S3 Tables match our raw, clean and curated zones; we draw the more common version with Glue jobs between zones. Current features were checked against the [Amazon S3 Tables documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables.html) and the [Athena guide to optimising data](https://docs.aws.amazon.com/athena/latest/ug/performance-tuning-data-optimization-techniques.html) in November 2026. The diagram and the commentary are archhy's own.
