In subchapter 29.1 we saw the data lake (S3 + Glue + Athena) for storing and querying raw data. We mentioned that there is a complementary concept: the data warehouse, optimized for very fast analysis of structured data. In AWS, that service is Amazon Redshift. In this subchapter, we’ll see what a data warehouse is, what Redshift does, and when to choose it over (or together with) a data lake. It’s the tool for doing serious and fast analytics on large volumes of data.

The problem: analyzing huge amounts of data, very quickly

Imagine a company that wants to answer, in seconds, complex questions about years of sales data: “What were the top 10 best-selling products by region and quarter in the last 3 years, compared to the previous year?” This involves analyzing millions or billions of records, cross-referencing and aggregating data.

A normal database (like the ones we saw in Chapter 8, designed to manage day-to-day operations: recording an order, querying a customer) is not optimized for this kind of massive analysis. It would perform those huge queries very slowly. You need a specialized tool for large-scale analysis: a data warehouse.

What is a data warehouse

A data warehouse is a database specialized in analyzing huge amounts of structured data very quickly. It is specifically designed for complex analytical queries (aggregations, comparisons, reports) on large volumes, usually historical data from the entire company.

   Normal database (Ch. 8):        optimized for day-to-day OPERATIONS
                                   (recording/querying individual items, fast)
   Data warehouse:                 optimized for large-scale ANALYSIS
                                   (complex queries on millions of records)

Analogy: the difference is like that between a store cash register and the head office analytics department. The cash register (normal database) is made for fast, individual operations: charging a purchase, returning a product. The analytics department (data warehouse) is made to take all sales from all stores over years and draw conclusions: trends, comparisons, reports. They are different tools for different jobs.

What is Amazon Redshift

Amazon Redshift is AWS’s data warehouse service: an analytical database, managed and highly scalable, optimized to run complex queries on huge volumes of data at high speed. It’s where companies do their serious business analytics and intelligence.

   Large volumes of structured data (sales, finance...)
                    │
                    ▼
            Amazon Redshift (data warehouse)
                    │
                    ▼
   Complex analytical queries answered FAST
   (reports, BI dashboards, trend analysis)

Why Redshift is so fast at analytics

Without getting technical, Redshift achieves its speed because it is designed from the ground up for analytics: it organizes and stores data in a way optimized for analytical queries, and distributes the work of a query among many resources in parallel (massively parallel processing). Thus, a query that would cross millions of records is resolved in seconds instead of hours.

Analogy: Redshift is like having a huge team of analysts working in parallel instead of just one. If you ask it to analyze millions of records, it’s not done by a single “person” sequentially (slow); the work is split among many who work at the same time and combine the result. That’s why it responds quickly even to huge questions.

Data lake vs data warehouse: which should I use?

This is the key question, and the answer is usually “both, for different things.” They don’t compete; they complement each other:

Data Lake (S3+Glue+Athena, 29.1) Data Warehouse (Redshift)
Stores Raw data, any format Structured and prepared data
Structure Flexible (defined at query time) Defined and optimized in advance
Ideal for Exploring, storing everything, varied data Fast, repeated analysis, BI reports
Query speed Good, flexible Very high for complex analysis
Cost Very cheap (S3) Higher (more analytical power)
   Typical combined pattern:
   Raw data → DATA LAKE (S3) → most important data is prepared
                                          │
                                          ▼
                                    DATA WAREHOUSE (Redshift)
                                    → fast, repeated analysis for reports

💡 Common pattern: many companies use both: the data lake (S3) stores all raw and cheap data, and the most important and structured data is loaded into Redshift for fast, recurring analysis (the daily business reports, the dashboards management checks every morning). The lake is the “everything”; the warehouse is the “refined and ready for intensive analysis.”

Real-world example: a retail chain stores absolutely all its raw data in its data lake (S3): sales, inventory, web logs, loyalty data... cheap and complete. Every night, a process (with Glue, subchapter 29.1) prepares and loads the sales and inventory data into Redshift. There, the analytics team runs complex reports every morning—“sales by category, region, and week, with year-over-year comparison”—that Redshift answers in seconds even though they cover years of data. Management consults BI dashboards powered by Redshift to make decisions. The data lake stores everything; Redshift powers fast day-to-day analysis. Together they form a complete data platform.

What you should remember

  • Analyzing huge volumes of data very quickly (complex reports on years of data) is not what a normal database is for (optimized for day-to-day operations); you need a data warehouse.
  • A data warehouse is a database specialized in large-scale analysis of structured data, optimized for complex analytical queries. Like the head office analytics department versus the cash register.
  • Amazon Redshift is AWS’s data warehouse: managed, highly scalable and extremely fast at analytics, because it’s designed for it and distributes the work in parallel (like a large team of analysts working at once).
  • Data lake (29.1) and data warehouse (Redshift) complement each other, they don’t compete: the lake stores all raw data (cheap, flexible); the warehouse stores the structured and refined data for fast, repeated analysis.
  • 💡 Common pattern: the data lake (S3) stores everything, and important data is loaded into Redshift for day-to-day business reports.

In the last subchapter of the chapter, we’ll see how to govern and secure all this data centrally with Lake Formation.

Cloud, AWS & Terraform — From Zero to Expert

Chapter 1 · What is cloud computing

Chapter 2 · The cloud market and major providers

Chapter 3 · Regions, availability zones and edge

Chapter 4 · Compute: EC2

Chapter 5 · Storage: S3

Chapter 6 · Networking: VPC

Chapter 7 · Identity and access: IAM

Chapter 8 · Managed databases

Chapter 9 · Why Infrastructure as Code

Chapter 10 · HCL: the Terraform language

Chapter 11 · Providers and state

Chapter 12 · Your first real infrastructure in Terraform

Chapter 13 · Load balancing and auto scaling

Chapter 14 · Serverless with Lambda

Chapter 15 · Messaging and events

Chapter 16 · Content delivery and DNS

Chapter 17 · Containers on AWS

Chapter 18 · Modules: reuse and composition

Chapter 19 · Workspaces and environment management

Chapter 20 · Remote backends and locking

Chapter 21 · Infrastructure testing

Chapter 22 · Terraform in CI/CD

Chapter 23 · Defense in depth

Chapter 24 · Observability: logs, metrics and traces

Chapter 25 · Cost optimization

Chapter 26 · High availability and disaster recovery

Chapter 27 · AWS Well-Architected Framework

Chapter 28 · Serverless architectures at scale

Chapter 29 · Data platforms on AWS

Chapter 30 · Multi-account and landing zones

Chapter 31 · Platform Engineering and Internal Developer Platform

Chapter 32 · Relevant AWS certifications

Chapter 33 · Projects to consolidate what you've learned

Chapter 34 · Resources and community

© Copyright 2024. All rights reserved