Transformation, processing, and governed data lakes
Explain and apply how to build a governed lake and select transformation compute and format. Compare ETL/query, Lambda/Glue/EMR, CSV/Parquet, and IAM/lake governance under explicit security, resilience, performance, operations, and cost constraints.
LESSON GOALS
By the end, you can
01
Define Lake Zones And Ownership
A governed lake begins with ownership and state transitions rather than a list of analytics services. Name the producer, the raw immutable landing location, the validation boundary, the curated publication contract, and the consumer roles. Record expected schemas, allowable evolution, retention, encryption key ownership, and the treatment of malformed records. Daily volume alone is insufficient: file count, median file size, arrival skew, and the interval between arrival and queryability determine transformation pressure. Query evidence should identify common predicates, selected columns, concurrency, and freshness. This allows partition and format choices to follow actual use. Separate data-plane permissions from catalog grants so an analyst cannot bypass a curated table by writing into its underlying prefix. Preserve lineage from source object through transformed output and make retries idempotent; otherwise a partially failed job can duplicate rows. A strong design also states which zone may be rewritten and which must remain append-only. These controls turn S3 storage, catalog metadata, transformation compute, lake permissions, and query execution into distinct responsibilities that can be secured and measured independently.
02
Choose Transform Engine And Layout
Lambda suits short isolated transformations that fit its runtime and resource model. It becomes awkward when thousands of tiny invocations must coordinate a wide shuffle, global sort, or compaction pass. AWS Glue supplies managed ETL, catalog integration, and distributed jobs, making it a practical default when the team wants Spark-style processing without cluster lifecycle work. EMR earns its additional operating surface when framework versions, plugins, persistent clusters, executor tuning, or ecosystem control are explicit requirements. Athena is query compute over data in place; it does not perform the durable cleansing and rewrite implied by curation. Layout governs its efficiency. Compressed Parquet or ORC lets a columnar query avoid reading unselected fields, while partition pruning can skip whole directory groups aligned with frequent filters. CSV and JSON remain useful exchange or raw formats, but repeated analytical scans pay for verbosity and unnecessary columns. Do not partition on every attribute. High-cardinality partitions produce sparse directories and metadata work. Instead, combine a modest query-aligned partition scheme with file compaction so each query opens fewer, larger objects without erasing useful pruning.
03
Control Publication And Failure
Treat publication as a commit, not as the incidental completion of a worker. Write transformed files to a staging prefix, validate row counts and quality rules, update catalog metadata only after success, and expose the new partition atomically where the chosen table format permits. Quarantine bad records with enough context to reproduce the error; silently dropping them produces a fast but untrustworthy lake. Size distributed jobs from input bytes, decompression, shuffle amplification, skew, and the completion window. A job with spare CPU can still miss freshness because one hot key owns the final reducer. Monitor input and output counts, rejected records, spill, worker utilization, run duration, catalog changes, bytes scanned, and denied access. The cost model spans requests caused by tiny files, temporary shuffle storage, Glue workers or EMR nodes, repeated query scans, and the operational cost of failed reruns. Compaction is therefore both a performance and request-cost control, but it should not merge data across retention or authorization boundaries. Before release, test an analyst query, a finance-restricted query, an old-schema record, a duplicate input, and a mid-job failure. Each test verifies a different contract rather than treating one successful SQL statement as proof of governance.
DECISION TABLE
Compare the architecture constraints
| requirement | choose | because | reject |
|---|---|---|---|
| managed ETL and catalog integration | AWS Glue | serverless managed transformation fits | self-managed EMR cluster |
| framework/version/cluster control | Amazon EMR | distributed ecosystem control is explicit | Glue default runtime |
| serverless SQL over curated S3 | Athena | query-in-place fits | using ETL engine as BI query tier |
| central lake grants | Lake Formation | governance is the requirement | bucket policy alone for every table entitlement |
GUIDED WORKED SCENARIO
Reason from the stated constraints
This is a guided example, not a question to memorise. The knowledge check uses new situations to test the same reasoning.
A retailer receives 4 TB/day of JSON events and 20,000 small files/hour. Analysts filter by event date and region; curated data must be available within 30 minutes and finance rows require restricted access.
Requirements
- Preserve immutable encrypted raw objects
- Compact and convert to compressed Parquet
- Partition by query-aligned date and region
- Enforce separate analyst and finance permissions
Reasoning path
- For Transformation, processing, and governed data lakes, eliminate any candidate that violates the explicit security or failure/performance dimension.
- Quantify the scale, operating burden, and complete cost horizon specific to Transformation, processing, and governed data lakes before ranking valid choices.
- Select the lowest-total-cost valid design for Transformation, processing, and governed data lakes, then change one decisive constraint and re-evaluate the loser.
Why it wins
- The format and partitions reduce scanned bytes for the stated filters
- Managed Glue meets the transform window without cluster operations
- Lake Formation expresses governed table access while S3 and KMS controls remain in force
Why the alternatives lose
It repeatedly scans verbose small files and does not perform the required durable curation
Becomes correct when: The dataset is small, occasional ad hoc scans are acceptable, and no rewrite is requiredIt adds cluster/version/capacity operations not required by the job
Becomes correct when: Exact framework plugins, persistent clusters, or deep executor control are mandatoryHigh file count and distributed compaction exceed a sensible lightweight transform boundary
Becomes correct when: Each event needs a short isolated transform and no wide shuffle or compactionARCHITECTURE VISUAL · TEXT MODE
Inspect the model
For Transformation, processing, and governed data lakes, read a keyboard-ordered table of requirements, quantities, candidate path or service, first failed constraint, repair, winner, and changed-constraint result; animation and color are unnecessary.
saa-viz-data-pipeline-labKNOWLEDGE CHECK
Answer one question at a time
Pass every question to complete this lesson. Each answer includes reasoning before you continue.
A mandatory custom Spark plugin cannot run in the managed Glue runtime. Which processing choice now wins?
Reveal reasoning
Amazon EMR becomes the processing choice because framework and cluster control now outweigh the managed-operation preference.
An analyst says a successful Glue job proves finance users are authorized. Which separate observation must be checked?
Reveal reasoning
Inspect Lake Formation table grants and underlying data permissions for the analyst identity; transform success proves data production, not viewer authorization.
Before revealing the pipeline, predict the first missed objective if 20,000 hourly JSON files are cataloged but never compacted.
Reveal reasoning
The curation/performance gate degrades through excessive file and scan overhead; compacting to partitioned columnar objects is the repair.
PRIMARY SOURCES
Verify the claims
- primaryAmazon S3 User Guideaws-storage-s3 · retrieved 2026-07-29
- primaryWhat is AWS Glue?aws-glue-overview · retrieved 2026-07-30
- primaryOptimize dataaws-athena-optimize-data · retrieved 2026-07-30
- primaryWhat is AWS Lake Formation?aws-lake-formation-overview · retrieved 2026-07-30
- primaryWhat is Amazon EMR?aws-emr-overview · retrieved 2026-07-30
- primaryAWS Key Management Service conceptsaws-sec-kms · retrieved 2026-07-29