All guides
Practice now
D2 · Design for New Solutions

Analytics and Data Lake: Redshift, Glue and Lake Formation

Petabyte-scale data architectures are a frequent topic on the SAP-C02. The exam expects you to be able to design end-to-end data pipelines: ingestion, transformation, storage, querying and governance.

Icon-Architecture/48/Arch_Amazon-Simple-Storage-Service_48

Data Lake architecture in AWS — the 5 layers

1

Ingest

Capturing data from multiple sources: batch and streaming.

• Kinesis Data Streams / Amazon Data Firehose — real-time streaming

• — migrating transactional databases

• AWS DataSync — transferring on-premises data to S3

• S3 Transfer Acceleration — fast uploads from global locations

• / AWS Snow Family — bulk transfers

2

Raw Storage

S3 as the central repository. Data is stored in its original format.

• (raw/landing zone) — untransformed data in its original format

• — cold or long-term archived data

• S3 Intelligent-Tiering — automatic lifecycle for unpredictable access patterns

3

Process

Transformation, cleansing and enrichment of data.

• AWS Glue — serverless ETL with a data catalog

• EMR — Spark/Hadoop for massive processing with full control

• — lightweight serverless transformation

• Managed Service for Apache Flink — streaming processing

4

Curated Storage

Transformed data ready for analytical consumption.

• S3 (curated zone) — Parquet/ORC for efficient queries with Athena

• Redshift — data warehouse for OLAP and BI

• — low-latency access for real-time dashboards

• ElastiCache — cache for frequent query results

5

Consume

Visualization, ML and access to the processed data.

• Athena — serverless SQL over S3

• Quick Sight — BI and dashboards (native AWS, formerly QuickSight)

• SageMaker — training ML models on lake data

• Redshift Spectrum — queries over S3 from Redshift

• OpenSearch — log search and analysis

Icon-Architecture/48/Arch_Amazon-Redshift_48

Amazon Redshift — columnar data warehouse at scale

Amazon Redshift is AWS's managed columnar data warehouse, built for OLAP (Online Analytical Processing). It scales to petabytes and supports complex SQL queries over aggregated data.

Architecture components

Leader NodeReceives SQL queries, generates the execution plan and coordinates the Compute Nodes.
Compute NodesRun query operations in parallel over their local data (columnar storage). Each node has slices.
Node TypesRA3: storage in S3, independent compute/storage scaling. DC2: local SSD only, higher cost.
Redshift ServerlessNo cluster provisioning. You pay per RPU-second. Ideal for intermittent workloads.
Concurrency ScalingAutomatically adds read clusters during peaks. First 1 hour/day is free.

Key features for the exam

Redshift SpectrumSQL queries directly over data in S3 (Parquet, ORC, CSV) without loading it into Redshift.
COPY commandParallel bulk load from S3, DynamoDB, EMR or SSH. Recommended method for loading data.
Distribution KeysDefines how rows are distributed across nodes. KEY: same key on the same node. ALL: table copied to all nodes. EVEN: round-robin.
Sort KeysSorts data on disk to speed up range filters. Compound vs Interleaved sort key.
Data SharingShare data between Redshift clusters across different accounts without moving the data.
Icon-Architecture/48/Arch_AWS-Glue_48

AWS Glue — serverless ETL and data catalog

📚

Glue Data Catalog

Central metadata repository: schemas, tables, partitions. Compatible with Hive Metastore. Used by Athena, Redshift Spectrum, EMR and Glue jobs to discover data.

🕷️

Glue Crawlers

Automatically scan data sources (S3, RDS, DynamoDB) and create/update table definitions in the Data Catalog. No manual schema definition code needed.

⚙️

Glue ETL Jobs

Python/Scala scripts that transform data using managed Apache Spark. Auto-generated code or your own scripts. Spark or Python Shell mode (for small workloads).

🧪

Glue DataBrew

Visual tool for data cleaning and normalization without code. 250+ pre-built transformations. For non-technical users.

🌊

Glue Streaming ETL

Processes data from Kinesis Data Streams or MSK (Kafka) in micro-batches with Spark Structured Streaming. For real-time data pipelines.

🔀

Glue Workflows

Orchestrates multiple Glue jobs and crawlers in a DAG (directed acyclic graph). Manual, scheduled or event-based triggers.

Glue vs EMR — when to use each

Use Glue when:

  • • ETL without managing infrastructure
  • • Infrequent or intermittent jobs
  • • The data catalog is the main requirement
  • • Startup time isn't critical (minutes)

Use EMR when:

  • • Full control over Spark configuration
  • • Long-running jobs (hours)
  • • Large-scale cost optimization (spot instances)
  • • Specific Hadoop tools (HBase, Hive, Presto)
Icon-Architecture/48/Arch_Amazon-Simple-Storage-Service_48

AWS Lake Formation — Data Lake governance and security

Lake Formation centralizes Data Lake security. Instead of managing S3 permissions directly, Lake Formation defines table- and column-level permissions in the Data Catalog, which are enforced across all services that use it (Athena, Redshift Spectrum, Glue).

Column-level security

Restricts access to specific columns (e.g., hiding PII like SSN or email from certain roles).

Row-level security

Filters rows based on the user running the query (e.g., each analyst only sees data from their own region).

Cell-level security

Combines row and column for maximum granular control.

Data Filters

Conditions automatically applied to queries without the user seeing them.

Cross-account access

Share Data Catalog tables with other AWS accounts via Lake Formation permissions.

Tag-based access

LF-Tags: permissions based on tags instead of specific ARNs. Scales to thousands of tables.

Icon-Architecture/48/Arch_Amazon-Athena_48

Amazon Athena — serverless SQL over S3

Key features

  • Serverless — no clusters, pay per TB of data scanned ($5/TB)
  • Uses the Glue Data Catalog as its metastore
  • Supports: Parquet, ORC, JSON, CSV, Avro, TSV
  • Athena Federated Query: connects to RDS, DynamoDB, Redshift via Lambda Connectors
  • Workgroups: control cost and access per team
  • Result caching: repeated queries don't re-scan S3

Cost optimization in Athena

  • Columnar format (Parquet/ORC): 60–90% less data scanned vs CSV
  • Compression: Snappy, Gzip, Zstd reduce size and therefore cost
  • Partitioning: Hive-style partitions (year/month/day) in S3 → only scans the needed partitions
  • Partition projection: defines partitions in the Data Catalog without crawlers
  • CTAS (Create Table As Select): creates compressed Parquet tables from queries
Icon-Architecture/48/Arch_Amazon-OpenSearch-Service_48

Amazon OpenSearch Service (formerly ElasticSearch)

OpenSearch is the successor to Amazon Elasticsearch Service. It's a distributed search and analytics engine for logs, documents and metrics. The exam mentions both names.

Full-text search

Search over JSON documents with relevance scoring. Ideal for product catalogs, technical documentation.

Log analysis

Kibana/OpenSearch Dashboards for visualizing application logs, CloudWatch Logs via Subscription Filters.

Geospatial search

Proximity and map queries. For geolocation apps and fleet tracking.

Icon-Architecture/48/Arch_Amazon-Redshift_48

When to use each analytics service

Workload typeServiceReason
Ad-hoc SQL queries over data in S3AthenaServerless, pay-per-scan, no cluster to maintain
Data warehouse for BI with fact/dimension tablesRedshiftColumnar, complex joins, BI connectors, concurrency scaling
Batch ETL without managing SparkGlueServerless ETL, integrated catalog, auto-generated code
Massive ETL with full control over SparkEMRSpot instances, custom configuration, cheaper at scale
Full-text search or log analysisOpenSearchSearch engine with scoring, Kibana for visualization
Real-time stream analysis with SQLManaged Service for Apache FlinkFlink SQL or Flink applications over continuous streams
ML over lake dataSageMaker + S3/AthenaAccesses S3 directly or via Athena for features
Column-level governance and security for the lakeLake FormationCentralized column/row/cell security for Athena + Redshift
Icon-Architecture/48/Arch_Amazon-Redshift_48

Common exam traps

Trap: "Redshift is for OLTP (transactions)"

Reality: FALSE. Redshift is OLAP (analytical). For OLTP use RDS or Aurora. Redshift isn't optimized for frequent single-row writes.

Trap: "Athena stores the data it queries"

Reality: FALSE. Athena queries data that already lives in S3. It doesn't move or store data — it only reads it. Storage lives in S3.

Trap: "Glue Crawlers are required to use Athena"

Reality: They aren't mandatory. You can define tables manually in the Data Catalog. Crawlers just automate that process.

Trap: "EMR is serverless like Glue"

Reality: FALSE. EMR requires cluster provisioning (EC2). You can use spot instances to reduce cost, but it isn't serverless. EMR Serverless exists for processing without managing clusters.

Did you get this topic?

Test what you just learned

A company needs to build a Data Lake in AWS. Data arrives via streaming from IoT devices (100K events/sec), gets processed with complex transformations, and business analysts need to run ad-hoc SQL queries. The security team requires that certain analysts NOT be able to see the 'customer_id' column. What is the correct architecture?

Ready to test "Analytics and Data Lake: Redshift, Glue and Lake Formation"?

Put what you learned to the test with original SAP-C02 exam questions.

Start SAP-C02 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.