We continue in Part VII with Chapter 29: Data Platforms on AWS, where we enter the world of large-scale data: storing, processing, and analyzing huge amounts of information. We start with the central concept of modern analytics: the data lake, and how to build it on AWS with three services that work together: S3 (storage), Glue (catalog and processing), and Athena (queries). This is the foundation for extracting value from a company's data.
The problem: companies generate data everywhere
A modern company generates a huge amount of data from very diverse sources: sales, web logs, sensors, social networks, applications... and in different formats (tables, text, records, files). This data, if well used, is gold: it reveals patterns, helps decision-making, and powers artificial intelligence. But there is a problem:
Data scattered everywhere: sales (in a database) web logs (in log files) sensors (in streaming) surveys (in spreadsheets) → hard to bring together, analyze, and leverage jointly
You need a place to gather all that data and be able to analyze it together. That place is the data lake.
What is a data lake
A data lake is a central repository where you store huge amounts of data of any type and format, in its original form, to analyze it whenever you want. The idea: first you store everything (without having to structure it in advance), and decide how to analyze it later.
Many data sources
│ (dump their data)
▼
┌─────────────────────────────┐
│ DATA LAKE │ ← all the data together,
│ (all types of data, │ in its original format
│ in its original format) │
└─────────────────────────────┘
│
▼ (analyze whenever and however you want)Analogy: a data lake is like a large warehouse/library where you store EVERYTHING just as it arrives (documents, photos, recordings, data...), without having to classify it perfectly upon entry. The point is that you have everything in one place and, when you need to answer a question, you go and analyze it. It contrasts with a very organized warehouse where only what fits on predefined shelves is allowed in (that would be more like a data warehouse, which we’ll see in subchapter 29.3). The lake accepts everything; you’ll give it structure when you need it.
💡 Lake vs warehouse: a data lake stores raw data, of any type, and you decide the structure when you query it (“schema-on-read”). A data warehouse (Redshift, subchap. 29.3) stores data already structured and optimized for fast queries. They are complementary; each has its role.
The three pieces in AWS: S3, Glue, and Athena
On AWS, a data lake is typically built with three collaborating services:
S3: the data lake’s storage
S3 (Chapter 5) is the place where the data of the data lake is stored. Remember its virtues: practically unlimited storage, very cheap, durable, and supports any type of file. It’s the perfect place to dump huge amounts of data in any format. S3 is, literally, the lake: the container for all the data.
S3 = the data lake’s storage (unlimited, cheap, any format) /sales/... /web-logs/... /sensors/... (everything together in S3)
Glue: the catalog and processing
Having millions of files in S3 is not very useful if you don’t know what’s there and where. AWS Glue solves that. It does two key things:
- Catalogs the data: discovers what data is in your S3 and creates a catalog (like an index or inventory) that says what information each dataset contains, its structure, etc. This way, the data in the lake becomes locatable and understandable.
- Processes and transforms the data (ETL): allows you to clean, transform, and prepare the data (for example, convert formats, join sources), so it’s ready for analysis.
Glue: 📇 Catalogs → creates an inventory of what data is in S3 (makes it "findable") 🔧 Processes → cleans and transforms the data to get it ready
Analogy: Glue is like the librarian of the big warehouse: it goes through everything stored, creates a catalog (you know what’s there and where to find it), and, when needed, prepares and organizes materials so you can use them. Without the librarian, the warehouse would be a chaotic mess.
Athena: query the data directly
Amazon Athena lets you run queries (with SQL) directly on the data stored in S3, without having to move it to a database. Using Glue’s catalog, you ask questions of your data as if it were a database, and Athena answers by reading directly from S3.
Athena: "SELECT ... " (SQL) directly on the data in S3 → answers to your questions without moving the data anywhere → you pay only for the queries you run (serverless)
The powerful part: Athena is serverless (no servers to manage, remember the philosophy from Chapter 14) and you pay only for the queries you run. It’s ideal for analyzing lake data in a flexible, on-demand way.
Analogy: Athena is like being able to ask questions directly to the library and get answers, without having to first take out all the books and bring them to another room. You ask “how many sales were there in March in Spain?” and it answers by querying the data where it is (in S3).
How they work together
The trio forms a complete data lake:
Data → S3 (stored: the lake)
│
Glue catalogs (you know what’s there) and processes (prepares the data)
│
Athena queries with SQL directly on S3 (you get answers)S3 stores, Glue organizes and prepares, Athena queries. Together they let you gather all your company’s data and extract value from it without building complex infrastructure.
Real-world example: a retail company wants to analyze customer behavior by combining sales, web browsing, and marketing campaign data. They build a data lake: they dump all that data into S3 (each source in its own folder). Glue scans S3, catalogs what’s there, and prepares the data (unifies formats, cleans). Then, analysts use Athena to ask SQL questions like “which products are most purchased by customers who came from a certain campaign?”, querying directly on S3, without setting up any database. They discover valuable patterns that were previously invisible with the data scattered. And all serverless: they pay for S3’s cheap storage and for the queries they run, with no servers to maintain.
What you should remember
- Companies generate a huge amount of scattered data from various sources and formats; leveraging it requires gathering it in one place: the data lake.
- A data lake is a central repository where you store huge amounts of data of any type, in its original format, to analyze whenever you want (store everything first, decide how to analyze it later). Like a big warehouse that accepts everything.
- On AWS it’s built with three pieces: S3 (the storage: unlimited, cheap, any format — it’s the lake), Glue (catalogs what data is there and processes/prepares it — the librarian), and Athena (queries with SQL directly on S3, serverless — ask the library).
- Together: S3 stores, Glue organizes, Athena queries, letting you extract value from all your data without complex infrastructure.
- 💡 A data lake (raw data) is complemented by a data warehouse (structured data, Redshift, subchap. 29.3).
In the next subchapter we’ll see how to capture and process data that arrives in real time, continuously, with Kinesis.
Cloud, AWS & Terraform — From Zero to Expert
Chapter 1 · What is cloud computing
- 1.1 The traditional client-server model
- 1.2 Problems the cloud came to solve
- 1.3 On-premise vs cloud vs hybrid
- 1.4 The three service models: IaaS, PaaS, SaaS
- 1.5 The five pillars of cloud (according to NIST)
- 1.6 Real advantages: elasticity, pay-as-you-go, global availability
Chapter 2 · The cloud market and major providers
- 2.1 AWS, Azure and GCP: differences and market share
- 2.2 Why learn AWS first
- 2.3 Concepts that are universal among providers
Chapter 3 · Regions, availability zones and edge
- 3.1 What is an AWS region and how to choose it
- 3.2 Availability Zones: high availability by design
- 3.3 Edge locations and CloudFront
- 3.4 Latency, resilience and data sovereignty
Chapter 4 · Compute: EC2
- 4.1 Instances: types, families and when to choose each
- 4.2 AMIs, key pairs and Security Groups
- 4.3 Instance lifecycle
- 4.4 Elastic IPs and Placement Groups
- 4.5 Savings Plans vs Reserved vs On-Demand vs Spot
Chapter 5 · Storage: S3
- 5.1 Buckets, objects and keys
- 5.2 Storage classes (Standard, IA, Glacier…)
- 5.3 Versioning and object lifecycle
- 5.4 Bucket policies and ACLs
- 5.5 Static website hosting
Chapter 6 · Networking: VPC
- 6.1 What is a VPC and why you need it
- 6.2 Public and private subnets
- 6.3 Internet Gateway and NAT Gateway
- 6.4 Route Tables and Network ACLs
- 6.5 VPC Peering and endpoints
Chapter 7 · Identity and access: IAM
- 7.1 Users, groups, roles and policies
- 7.2 The principle of least privilege
- 7.3 Identity-based vs resource-based policies
- 7.4 MFA and temporary credentials (STS)
- 7.5 IAM security best practices
Chapter 8 · Managed databases
- 8.1 RDS: engines, Multi-AZ and read replicas
- 8.2 Aurora and its advantages over vanilla RDS
- 8.3 DynamoDB: key-value / document model
- 8.4 ElastiCache for in-memory cache
- 8.5 When to use each type of database
Chapter 9 · Why Infrastructure as Code
- 9.1 Problems with manual provisioning
- 9.2 Declarative vs imperative IaC
- 9.3 Terraform vs CloudFormation vs Pulumi vs CDK
- 9.4 The plan → apply → destroy cycle
Chapter 10 · HCL: the Terraform language
- 10.1 Resource, variable, output, locals blocks
- 10.2 Data types: string, number, bool, list, map, object
- 10.3 Expressions, references and built-in functions
- 10.4 Conditionals and loops (count, for_each, for)
Chapter 11 · Providers and state
- 11.1 How the AWS provider works
- 11.2 The terraform.tfstate file and its importance
- 11.3 Local state vs remote state (S3 + DynamoDB)
- 11.4 Essential commands: init, plan, apply, destroy, fmt, validate
Chapter 12 · Your first real infrastructure in Terraform
- 12.1 Create a VPC with subnets from scratch
- 12.2 Launch a public EC2 instance
- 12.3 Associate a Security Group and an Elastic IP
- 12.4 Outputs and references between resources
- 12.5 Team workflow: PR review of plans
Chapter 13 · Load balancing and auto scaling
- 13.1 Application Load Balancer vs Network Load Balancer
- 13.2 Target Groups, listeners and rules
- 13.3 Auto Scaling Groups: policies and metrics
- 13.4 Warm pools and lifecycle hooks
Chapter 14 · Serverless with Lambda
- 14.1 The Lambda execution model
- 14.2 Triggers: API Gateway, S3, DynamoDB Streams, SQS
- 14.3 Dependency management and layers
- 14.4 Cold starts and strategies to reduce them
- 14.5 Limits and anti-patterns
Chapter 15 · Messaging and events
- 15.1 SQS: standard vs FIFO queues, DLQ
- 15.2 SNS: topics, subscriptions, fan-out
- 15.3 EventBridge: event buses and rules
- 15.4 Patterns: pub/sub, decoupling, saga
Chapter 16 · Content delivery and DNS
- 16.1 Route 53: record types and routing policies
- 16.2 CloudFront: distributions, caches and origins
- 16.3 ACM: free SSL/TLS certificates
- 16.4 WAF integrated with CloudFront
Chapter 17 · Containers on AWS
- 17.1 Docker: quick review of key concepts
- 17.2 ECR: private image registry
- 17.3 ECS: task definitions, services, Fargate vs EC2
- 17.4 EKS: when Kubernetes and when not
Chapter 18 · Modules: reuse and composition
- 18.1 Anatomy of a Terraform module
- 18.2 Input variables, outputs and dependencies
- 18.3 Local modules vs Terraform Registry modules
- 18.4 Module versioning with Git tags
- 18.5 Design of generic vs domain-specific modules
Chapter 19 · Workspaces and environment management
- 19.1 Terraform workspaces: use cases and limitations
- 19.2 Directory strategy per environment (dev/stg/prod)
- 19.3 Terragrunt: DRY for environment configurations
- 19.4 Environment variables and .tfvars files
Chapter 20 · Remote backends and locking
- 20.1 Configure S3 + DynamoDB as backend
- 20.2 State locking: avoiding team corruption
- 20.3 State migration between backends
- 20.4 terraform import: bring existing resources into state
Chapter 21 · Infrastructure testing
- 21.1 Terraform validate and fmt in CI
- 21.2 Checkov and tfsec: static security analysis
- 21.3 Terratest: integration tests in Go
- 21.4 Contract testing between modules
Chapter 22 · Terraform in CI/CD
- 22.1 Basic pipeline: lint → plan → apply in GitHub Actions
- 22.2 Atlantis: GitOps for Terraform
- 22.3 Terraform Cloud / HCP Terraform
- 22.4 Drift detection and automatic reconciliation
Chapter 23 · Defense in depth
- 23.1 AWS Organizations and Service Control Policies
- 23.2 AWS Config: continuous compliance
- 23.3 GuardDuty: threat detection
- 23.4 Security Hub: centralized view
- 23.5 KMS: key management and rotation
- 23.6 Secrets Manager vs Parameter Store
Chapter 24 · Observability: logs, metrics and traces
- 24.1 CloudWatch Logs, metrics and alarms
- 24.2 CloudWatch Dashboards and Contributor Insights
- 24.3 X-Ray: distributed tracing
- 24.4 OpenTelemetry on AWS
- 24.5 Managed Grafana and Managed Prometheus
Chapter 25 · Cost optimization
- 25.1 AWS Cost Explorer and budgets with alerts
- 25.2 Trusted Advisor and Compute Optimizer
- 25.3 Rightsizing: how to detect overprovisioning
- 25.4 Savings Plans vs Reserved Instances: strategic decision
- 25.5 FinOps: culture and processes to control spending
Chapter 26 · High availability and disaster recovery
- 26.1 RTO and RPO: defining objectives
- 26.2 Strategies: backup/restore, pilot light, warm standby, multi-site
- 26.3 Route 53 health checks and automatic failover
- 26.4 AWS Backup: centralized backup policy
Chapter 27 · AWS Well-Architected Framework
- 27.1 The six pillars: operational excellence, security, reliability, performance efficiency, cost optimization, sustainability
- 27.2 Well-Architected Tool: formal reviews
- 27.3 How to apply the framework in design decisions
Chapter 28 · Serverless architectures at scale
- 28.1 Event-driven architecture with Lambda + EventBridge
- 28.2 Saga pattern for distributed transactions
- 28.3 Step Functions: orchestration of complex workflows
- 28.4 Lambda@Edge and CloudFront Functions
Chapter 29 · Data platforms on AWS
- 29.1 Data Lake with S3, Glue and Athena
- 29.2 Kinesis Data Streams and Firehose for streaming
- 29.3 Redshift: data warehousing at scale
- 29.4 Lake Formation: data governance
Chapter 30 · Multi-account and landing zones
- 30.1 Why separate workloads into different accounts
- 30.2 AWS Control Tower and Account Factory
- 30.3 Centralized log and security management
- 30.4 Terraform at multi-account scale with shared modules
Chapter 31 · Platform Engineering and Internal Developer Platform
- 31.1 Golden paths and abstractions over Terraform
- 31.2 AWS Service Catalog
- 31.3 Backstage as a developer portal
- 31.4 Terraform modules as internal product
Chapter 32 · Relevant AWS certifications
- 32.1 Cloud Practitioner: is it worth it?
- 32.2 Solutions Architect Associate → Professional
- 32.3 DevOps Engineer Professional
- 32.4 Specialty: Security, Database, Networking
- 32.5 HashiCorp Terraform Associate
Chapter 33 · Projects to consolidate what you've learned
- 33.1 Project 1: serverless blog (S3 + CloudFront + Lambda + DynamoDB)
- 33.2 Project 2: REST API with ECS Fargate + RDS + ALB
- 33.3 Project 3: data platform with Glue + Athena + Redshift
- 33.4 Project 4: multi-account landing zone with Terraform and Control Tower
