This page requires JavaScript to display.
L
Unpacking...
← Data Engineering
Data Engineering

Data Lake Reference

Architecture, governance, AWS Lake Formation, and the schema-evolution rules that make or break a lake in practice.

Contents
1. What a Data Lake Is 2. Vs. Relational Databases 3. Reference Architecture 4. Challenges 5. Governance 6. Building with Lake Formation 7. Schema Evolution 8. The Lakehouse & Medallion Architecture 9. Streaming Ingestion 10. Proof of Concept First 11. Building a Lakehouse on Databricks 12. Unity Catalog 13. Data Governance Architecture 14. Banking Compliance & Regulation

1. What a Data Lake Is

A data lake stores files in their native format (S3), catalogs their structure as queryable tables (the Glue Data Catalog), and lets you query them with SQL (Athena) — without first forcing every source into a rigid relational schema. That combination makes it well suited to data discovery, exploratory data analysis, and machine learning, where the eventual use of the data isn't fully known up front.

2. Vs. Relational Databases

Relational databases remain excellent for tabular, well-understood data: SQL, automatic type/integrity checks, consistency, security, and a mature ecosystem — at the cost of complexity, expense, rigid structure, and ongoing development effort. A data lake trades that rigidity for flexibility:

Data WarehouseData Lake
Data structureWell-defined: tables, rows, columnsNative format, raw — no defined schema up front
PurposeClearly defined usage scenariosExploratory analysis, discovery, ML
ProcessingFast, consistent, reliable resultsAd hoc, mixed formats, variable processing time
AccessibilityComplex and expensive to changeHighly customizable, quick to update

Most organizations need both, feeding each other — see the separate Data Warehouse reference doc for the warehouse side of this picture.

3. Reference Architecture

A data lake is not one product but an architecture assembled from several services, each covering one concern:

S3
Durable, cheap object storage — the lake's foundation.
Glue Data Catalog
Central metastore describing tables and partitions over S3 files.
Glue ETL
Managed Spark jobs that clean and reshape data between zones.
Athena / Redshift Spectrum
Serverless SQL directly over the catalog and S3.
EMR
Managed Spark/Hadoop clusters for heavier custom processing.
Kinesis
Streaming ingestion into the lake in near real time.
Lake Formation
Builds and secures the lake with one permission model.
QuickSight
Visualization layer on top of curated lake data.

Organize S3 itself into zones: a raw/landing zone for unmodified source data, a cleaned/curated zone for validated and reformatted data, and a consumption zone shaped for specific analytics or ML use cases.

4. Challenges

5. Governance

Because data lands in raw form, governance has to be a deliberate strategy, not an afterthought:

AreaResponsibility
Data stewardshipAssign ownership of specific data assets to individuals or teams
Data quality managementMonitor and maintain accuracy, completeness, consistency
Data securityAccess control, encryption, audit data access and usage
Data complianceManage data per legal/regulatory (GDPR, HIPAA) and contractual terms
Data consistencyKeep format, structure and values trustworthy across the lake

6. Building with Lake Formation

AWS Lake Formation centralizes lake setup and permissions on top of S3 and the Glue Catalog:

Typical course-outline build sequence: 1) set up a simple data lake on raw S3 data, 2) build it properly with Lake Formation, 3) layer on security and access controls, 4) automate with blueprints/workflows, 5) visualize with QuickSight.

7. Schema Evolution

How safely a lake tolerates a changing schema depends entirely on file format, because Athena reads columns differently by format:

ChangeCSV / TSV (read by index)Parquet (read by name)
Reorder columnsBreaks — wrong values land in wrong columnsSafe
Add a columnSafe only appended at the endSafe anywhere
Remove a columnNot supported — misaligns remaining columnsSafe
Rename a columnSafe — index-based, name is cosmeticNot supported — old data under the old name becomes unreachable
Change data typeRequires testing either wayRequires testing either way

Keep the Glue Catalog current: schedule crawlers to run periodically, since Athena and other query engines misbehave once the catalog drifts from the actual data. Never mix structurally different files in the same S3 prefix — a crawler can create multiple tables from one prefix if the schemas underneath don't match, and query engines expect one consistent shape per path.

8. The Lakehouse & Medallion Architecture

A lakehouse adds warehouse-like guarantees — ACID transactions, schema enforcement, time travel — directly on top of lake storage, using an open table format: Delta Lake, Apache Iceberg, or Apache Hudi. It aims to close the gap in §2 without running two separate systems.

The medallion architecture organizes a lakehouse into three progressively refined zones:

Bronze
Raw data landed as-is from source systems, append-only, full history kept.
Silver
Cleaned, validated, deduplicated, conformed to a consistent schema.
Gold
Business-level aggregates and marts, ready for BI tools and reporting.

Each zone is typically its own set of Delta/Iceberg tables, with a pipeline (often Spark or Glue ETL) promoting data from one zone to the next — the same bronze→silver→gold vocabulary maps directly onto the staging→core→mart layers described in the Data Warehouse reference doc.

9. Streaming Ingestion

Lakes increasingly ingest continuously rather than in nightly batches, landing data straight into the bronze zone as it arrives:

from pyspark.sql.functions import current_timestamp

spark.readStream.format("kinesis") \
    .option("streamName", "orders-stream") \
    .option("region", "us-east-1") \
    .option("startingPosition", "TRIM_HORIZON") \
    .load() \
  .withColumn("ingested_at", current_timestamp()) \
  .writeStream \
    .format("delta") \
    .option("checkpointLocation", "/checkpoints/bronze/orders") \
    .start("/lake/bronze/orders")

Kinesis Data Firehose can also write directly to S3 with no Spark job at all, trading transformation flexibility for operational simplicity — a good fit when bronze truly needs no logic beyond "land the raw record."

10. Proof of Concept First

Before committing significant time and resources, build a small proof-of-concept lake to validate the approach:

11. Building a Lakehouse on Databricks

Cloud storage (S3) ─► Unity Catalog (catalog · schemas · volumes · external locations)
  ─► Ingest (Auto Loader / Lakeflow Connect / Kafka) ─► BRONZE ─► SILVER ─► GOLD (Delta)
  ─► Orchestrate (Lakeflow Jobs / Declarative Pipelines)
  ─► Govern (grants, masks, lineage)
  ─► Serve (SQL warehouses, dashboards, BI, ML)
StepWhat to do
0. PrerequisitesA Unity Catalog-enabled workspace (Free Edition or a trial is fine) and CREATE CATALOG privilege
1. StorageS3 bucket (KMS, Block Public Access) → IAM role → storage credential → external location
2. Catalog objectsA catalog per environment × domain; bronze / silver / gold schemas; volumes for landing files and checkpoints
3. BronzeAuto Loader for files, Structured Streaming for Kafka, Lakeflow Connect for databases and SaaS; append-only with source metadata
4. SilverValidate and quarantine, dedupe, cast, tokenise PII, MERGE upserts, SCD2; liquid clustering, constraints, change data feed
5. GoldStar schemas, Customer 360, aggregates, feature tables, or materialized views
Alt. 3–5One Lakeflow Declarative Pipeline: streaming tables + expectations + materialized views
6. OrchestrateA Lakeflow Job (a task per layer) defined in an Asset Bundle, scheduled
7. GovernGRANTs by layer, column masks, row filters, tags and comments; lineage is automatic
8. ServeSQL warehouses, AI/BI dashboards, Genie, BI tools, ML, Delta Sharing
9. MaintainPredictive optimisation (OPTIMIZE / VACUUM), DQ monitoring, system-table dashboards, time travel / RESTORE
10. RepeatableTerraform for storage, UC and policies; Asset Bundles for jobs; CI/CD
CREATE CATALOG IF NOT EXISTS fraud_dev MANAGED LOCATION 's3://bank-lakehouse-dev/managed';
CREATE SCHEMA IF NOT EXISTS fraud_dev.bronze;
CREATE SCHEMA IF NOT EXISTS fraud_dev.silver;
CREATE SCHEMA IF NOT EXISTS fraud_dev.gold;
CREATE VOLUME IF NOT EXISTS fraud_dev.bronze.landing;

GRANT USE CATALOG ON CATALOG fraud_dev TO `fraud_analysts`;
GRANT USE SCHEMA, SELECT ON SCHEMA fraud_dev.gold TO `fraud_analysts`;

12. Unity Catalog

Unity Catalog is Databricks' governance layer: one place that records what data exists, where it lives, who may access it, and how it is used. Delta stores the tables; Unity Catalog organises and secures them.

FeatureExample
Three-level names: catalog.schema.tablefraud_prod.silver.scored_transactions
GRANT / REVOKE, column masks, row filtersOnly the fraud team reads silver; account numbers are masked for everyone else
Lineage (table and column level)Dashboard ← gold ← silver ← bronze ← Kafka topic
Audit logs and system tablesEvidence of who accessed what, for regulators
Discovery and tagsTag columns as PII and drive masking from tags
Volumes, models, functionsFiles and ML models governed alongside the data
Delta SharingShare live data with a partner without copying it

13. Data Governance Architecture

Federated (data mesh) governance

Domains own their data as products, a central council sets a small number of global rules, and the platform enforces those rules automatically. This is called federated computational governance.

RoleResponsibility
CDOStrategy; chairs the governance council
Governance councilGlobal policies and standards; resolves cross-domain conflicts
Data owner (business)Accountable for a domain's data: access, quality targets, retention
Data stewardDefinitions, quality rules, issue resolution
Platform team / custodianStorage, security controls, tooling
Data product ownerContract, SLAs and consumers of one data product

BCBS 239 (risk data aggregation and reporting)

GroupPrinciples
Governance and infrastructure1 Governance · 2 Data architecture and IT infrastructure
Risk data aggregation3 Accuracy and integrity · 4 Completeness · 5 Timeliness · 6 Adaptability
Risk reporting7 Accuracy · 8 Comprehensiveness · 9 Clarity · 10 Frequency · 11 Distribution
Supervisory review12–14

In practice: identify the critical data elements (CDEs) behind key risk reports; give each an owner, definition, lineage, DQ rules and a reconciliation to the general ledger; build a governed risk data platform with canonical models and MDM for counterparties; remove manual spreadsheet adjustments; define SLAs, including for stress scenarios; and keep evidence (scorecards, reconciliation logs, lineage) for supervisors.

Lineage and data quality at scale

Data residency and privacy across clouds

 Global control plane: unified catalog + classification tags · policy-as-code · central audit
        │ same policies pushed to each region
 INDIA data plane (primary + in-country DR)      EU data plane (own regions)
 raw PII and payment data stay; token vault;     EU PII stays; own keys;
 bank-controlled KMS/HSM keys                    local processing
        └── only aggregated / anonymised / tokenised data crosses borders ──┘
LayerControl
ClassificationAutomatic PII discovery + steward review; sensitivity and jurisdiction tags
PlacementCloud org policies (SCPs, Azure Policy) allow approved regions only
De-identificationTokenise account, card, Aadhaar and PAN numbers at ingestion; token vault stays in-country
EncryptionPer-region keys in KMS/HSM controlled by the bank (BYOK/HYOK)
AccessABAC on role, location, tags and purpose; row filters; column masking; same policies in every cloud
NetworkPrivate endpoints, egress control, DLP
Backups, logs, SaaS, AISame residency rules; in-region DR; no restricted PII in external prompts

How they connect: governance sets the rules, the platform enforces them, lineage and quality prove they work, and that evidence is what regulators ask for.

14. Banking Compliance & Regulation

Regulations change often, so verify current versions. This is a learning map, not legal advice.

AreaIndiaGlobal / US / EUData-engineering impact
AML / KYC / CFTPMLA 2002, RBI KYC Master Direction, FIU-IND (CTR, STR)FATF; BSA / PATRIOT Act (CTR, SAR); EU AML directivesTransaction monitoring, risk scoring, report files, 5+ year retention
SanctionsUAPA listsUN, OFAC, EU, UK listsDaily list loads, fuzzy screening in payment flows, decision audit
FraudRBI Master Directions on Fraud Risk Management (2024), NPCI rulesPSD2 SCA; Reg EReal-time detection, case management, explainable alerts
PrivacyDPDP Act 2023 (rules phasing in)GDPR; GLBA, CCPAMasking / tokenisation, consent, minimisation, deletion workflows
LocalisationRBI 2018: payment data stored only in IndiaVarious residency lawsIn-country regions; no foreign copies, including backups and logs
Card dataRBI card tokenisationPCI DSS v4.xNever store CVV; tokenise or encrypt PAN; no card numbers in logs, topics or the lake
Capital and risk dataRBI Basel IIIBasel III, BCBS 239, IFRS 9Data quality, reconciliation, lineage, governed risk platform
IT / cyber / cloudRBI IT Governance (2023), Cyber Security Framework, CERT-In 6-hour reportingDORA (2025), NYDFS 500Least privilege, audit logs, DR, change control, vendor risk
Financial and tax reporting—SOX; FATCA / CRSDocumented controls and reconciliations
Model riskRBI expectationsSR 11-7Versioned data and models, explainability, monitoring

Applied to a fraud platform: tokenise account, device and payee IDs; encrypt and restrict access; keep reasons and an audit trail for every alert with STR export; define retention; deploy in an Indian region with KMS and IAM; and document and monitor rules and models.