Cloud Big Data Services
AWS, Azure, and GCP solutions for petabyte-scale data processing
Why Cloud for Big Data?
Building and maintaining your own Hadoop cluster for 100 nodes costs millions upfront and requires a dedicated team of DevOps engineers. Cloud providers offer fully managed big data services where you pay only for what you use, spin up a 1000-node cluster for 2 hours, run your job, and shut it down. This lesson compares AWS, Azure, and Google Cloud's big data offerings, showing when to use each service and how they differ in pricing, performance, and features.
Cloud vs On-Premise Big Data
โ๏ธ Cloud (Managed Services)
- No upfront cost, Pay per hour/query
- Elastic scaling, Scale from 10 to 1000 nodes instantly
- Zero maintenance, Provider handles patches, upgrades
- Fast deployment, Start in minutes, not months
- Global reach, Deploy in 20+ regions worldwide
๐ข On-Premise (Self-Managed)
- High upfront cost, $2-5M for 100-node cluster
- Fixed capacity, Can't scale up for peak loads
- Operations team, Need 5-10 dedicated engineers
- Slow provisioning, 3-6 months to deploy
- Single location, Limited disaster recovery
Big Data Service Categories
All three cloud providers offer similar categories of services. Understanding these categories helps you choose the right tool for each job.
๐พ Storage
Store petabytes of raw data
- Object storage (S3, Blob, GCS)
- Data lakes
- Archive storage
โ๏ธ Processing
Transform & analyze data
- Hadoop/Spark clusters
- Serverless compute
- Stream processing
๐ Analytics
Query & visualize insights
- Data warehouses
- SQL query engines
- BI dashboards
๐ Data Movement
Ingest & transfer data
- ETL pipelines
- Data migration
- Real-time streaming
๐ค ML & AI
Train & deploy models
- ML platforms
- AutoML services
- Pre-trained models
๐ Search & Logs
Full-text search & monitoring
- Elasticsearch
- Log analytics
- APM monitoring
AWS (Amazon Web Services)
Market leader with the most comprehensive ecosystem
AWS pioneered cloud computing and has the largest market share (~32%). It offers the most services (200+) and deepest features, but can be complex to navigate. Best for: enterprises needing comprehensive solutions and startups wanting to scale globally.
Core Big Data Services
S3 (Simple Storage Service), Data Lake Foundation
What it is: Object storage for unlimited data
Pricing: $0.023/GB/month (Standard)
Durability: 99.999999999% (11 nines)
Max object size: 5TB
Best for: Data lakes, backups, logs
Integrations: Everything in AWS
# AWS CLI: Upload data to S3 aws s3 cp large_dataset.parquet s3://my-data-lake/raw-data/ # Query S3 directly with Athena (serverless SQL) SELECT customer_id, SUM(revenue) as total FROM "s3://my-data-lake/sales/*.parquet" WHERE year = 2024 GROUP BY customer_id LIMIT 100;
Cost: 1TB data = $23/month storage + $5/TB scanned
โ Pros:
- Unlimited scalability
- Tiered storage (Standard, IA, Glacier)
- Lifecycle policies (auto-archive)
โ Cons:
- Eventual consistency (in some cases)
- Costs add up for frequent access
EMR (Elastic MapReduce), Managed Hadoop/Spark
What it is: Managed Hadoop, Spark, Presto clusters
Pricing: EC2 cost + 25% EMR fee
Cluster size: 1 to 1000s of nodes
Best for: Large-scale ETL, ML training
# Launch 50-node Spark cluster
aws emr create-cluster \
--name "ETL Pipeline" \
--release-label emr-6.15.0 \
--applications Name=Spark Name=Hadoop \
--instance-type m5.xlarge \
--instance-count 50 \
--use-default-roles
# Submit Spark job
aws emr add-steps \
--cluster-id j-XXXXXXXXXXXXX \
--steps Type=Spark,Name="Process Data",\
Args=[--class,com.example.ETL,s3://my-bucket/etl.jar]Cost: ~$50/hour for m5.xlarge ร 50
Auto-terminate: Cluster shuts down after job completes
Redshift, Petabyte-Scale Data Warehouse
What it is: Columnar SQL data warehouse
Pricing: $0.25/hour/node (on-demand)
Performance: 10x faster than traditional DBs
Max size: 16 PB per cluster
Concurrency: 500 queries simultaneously
Best for: BI dashboards, analytics
-- Load data from S3
COPY sales FROM 's3://my-bucket/sales/'
IAM_ROLE 'arn:aws:iam::xxx:role/RedshiftRole'
FORMAT AS PARQUET;
-- Query 10 billion rows (sub-second)
SELECT product_category,
SUM(revenue) as total_revenue,
COUNT(DISTINCT customer_id) as customers
FROM sales
WHERE order_date >= '2024-01-01'
GROUP BY product_category
ORDER BY total_revenue DESC
LIMIT 10;Columnar storage: Only scans needed columns
Result caching: Identical queries return instantly
Athena, Serverless SQL on S3
What it is: Query S3 data with SQL (no servers)
Pricing: $5 per TB scanned
Setup time: Zero (serverless)
Best for: Ad-hoc queries, exploration
-- Create table pointing to S3 Parquet files CREATE EXTERNAL TABLE logs ( user_id STRING, timestamp TIMESTAMP, action STRING, page_url STRING ) STORED AS PARQUET LOCATION 's3://my-bucket/logs/year=2024/'; -- Query directly (no data loading!) SELECT action, COUNT(*) as count FROM logs WHERE timestamp >= TIMESTAMP '2024-01-01' GROUP BY action ORDER BY count DESC;
Cost: $10 for this query
Time: 15 seconds
Pro tip: Partition data to reduce scans = lower cost
Kinesis, Real-Time Data Streaming
What it is: Managed Kafka-like streaming
Throughput: MB to TB per second
Retention: 24 hours to 365 days
Best for: Real-time analytics, IoT
# Python: Send data to Kinesis
import json
import boto3
kinesis = boto3.client('kinesis')
kinesis.put_record(
StreamName='clickstream',
Data=json.dumps({
'user_id': '12345',
'action': 'purchase',
'amount': 99.99
}),
PartitionKey='user_12345'
)
# Process with Lambda (serverless)
# Triggered automatically for each recordAuto-scaling: Handles spikes automatically
Integration: Lambda, Spark, Flink all supported
AWS Strengths & Weaknesses
โ Strengths
- Most comprehensive service catalog
- Largest ecosystem & community
- Best global infrastructure (30+ regions)
- Mature, battle-tested services
- Deep integrations between services
- Extensive third-party tooling
โ Weaknesses
- Complex pricing (hard to estimate)
- Steeper learning curve
- Overwhelming number of services
- UI can be clunky
- Legacy services still around
- Can be more expensive than GCP
Microsoft Azure
Enterprise favorite with strong Microsoft integration
Azure is Microsoft's cloud platform, holding ~23% market share. It excels at hybrid cloud (on-premise + cloud) and integrates seamlessly with Microsoft products (Windows, SQL Server, Active Directory). Best for: enterprises already using Microsoft stack.
Core Big Data Services
Azure Blob Storage + Data Lake Gen2
What it is: Object storage with hierarchical namespace
Pricing: $0.018/GB/month (Hot tier)
Unique feature: POSIX-like file system
Best for: Data lakes with directory structure
# Azure CLI: Upload to Blob Storage az storage blob upload-batch \ --account-name mydatalake \ --destination raw-data \ --source ./local-data/ \ --pattern "*.parquet" # Enable hierarchical namespace (Data Lake Gen2) az storage account update \ --name mydatalake \ --enable-hierarchical-namespace true
Synapse Analytics, Unified Analytics Platform
What it is: Data warehouse + Spark + Pipelines in one
Pricing: Pay-per-use or dedicated pools
Serverless SQL: Query without provisioning
Best for: End-to-end analytics workloads
-- Serverless SQL pool (no infrastructure)
SELECT
product_category,
SUM(revenue) as total_revenue
FROM OPENROWSET(
BULK 'https://mydatalake.dfs.core.windows.net/sales/*.parquet',
FORMAT = 'PARQUET'
) AS sales
WHERE order_date >= '2024-01-01'
GROUP BY product_category;
-- Also run Spark notebooks in same workspace
spark.read.parquet("abfss://sales@mydatalake.dfs.core.windows.net/")
.groupBy("category")
.agg(sum("revenue"))
.show()Cost: $5/TB scanned (serverless) or $1.20/hour (dedicated pool)
HDInsight, Managed Hadoop/Spark
What it is: Azure's version of EMR
Pricing: VM cost + 20% HDInsight fee
Clusters: Spark, Hadoop, Kafka, HBase
Integration: Deep Azure ecosystem ties
# Azure CLI: Create Spark cluster az hdinsight create \ --name spark-cluster \ --resource-group myResourceGroup \ --type spark \ --cluster-tier Standard \ --component-version Spark=3.1 \ --headnode-size Standard_D12_v2 \ --workernode-count 10 \ --workernode-size Standard_D13_v2
Event Hubs, Kafka-Compatible Streaming
What it is: Kafka as a service
Throughput: Millions of events/second
Kafka compatible: Use existing Kafka code
Best for: Telemetry, logs, clickstream
# Python: Send to Event Hub (Kafka protocol)
from kafka import KafkaProducer
producer = KafkaProducer(
bootstrap_servers='myeventhub.servicebus.windows.net:9093',
security_protocol='SASL_SSL',
sasl_mechanism='PLAIN',
sasl_plain_username='$ConnectionString',
sasl_plain_password='Endpoint=sb://...'
)
producer.send('telemetry', b'sensor data')
producer.flush()Azure Strengths & Weaknesses
โ Strengths
- Best hybrid cloud support
- Seamless Microsoft integration (SQL, AD)
- Enterprise agreements (existing licenses)
- Strong compliance certifications
- Synapse Analytics (unified platform)
- Excellent Windows workloads
โ Weaknesses
- Smaller service catalog than AWS
- Some services less mature
- Confusing naming (Data Lake Gen1 vs Gen2)
- Portal can be slow
- Fewer regions than AWS
- Limited open-source tooling
Google Cloud Platform (GCP)
Innovation leader with best data analytics and ML
GCP holds ~11% market share but leads in data analytics and machine learning innovation. Google invented MapReduce, BigTable, and many foundational big data technologies. Best for: data-intensive startups, ML workloads, and companies wanting cutting-edge analytics.
Core Big Data Services
Cloud Storage, Unified Object Storage
What it is: Object storage (like S3)
Pricing: $0.020/GB/month (Standard)
Strong consistency: Always (not eventual)
Best for: Data lakes, ML training data
# gsutil: Upload to Cloud Storage gsutil -m cp -r ./local-data gs://my-data-lake/raw-data/ # Create external table for GCS data, then query CREATE EXTERNAL TABLE `project.dataset.sales_external` OPTIONS ( format = 'PARQUET', uris = ['gs://my-data-lake/sales/*.parquet'] ); SELECT customer_id, SUM(revenue) as total FROM `project.dataset.sales_external` GROUP BY customer_id;
BigQuery, Serverless Data Warehouse
What it is: Fully serverless, auto-scaling warehouse
Pricing: $5/TB scanned OR $0.04/GB/month storage
Performance: Scans TB in seconds
Max size: Unlimited (petabytes+)
Concurrency: Unlimited (auto-scales)
Best for: Analytics on massive datasets
-- Load data from Cloud Storage LOAD DATA INTO `project.dataset.sales` FROM FILES ( format = 'PARQUET', uris = ['gs://my-bucket/sales/*.parquet'] ) WITH CONNECTION `project.region.connection_id`; -- Query 10 billion rows (no cluster to manage!) SELECT DATE_TRUNC(order_date, MONTH) as month, product_category, SUM(revenue) as revenue, APPROX_COUNT_DISTINCT(customer_id) as customers FROM `project.dataset.sales` WHERE order_date >= '2024-01-01' GROUP BY month, product_category ORDER BY revenue DESC;
Data scanned: 1.2 TB
Cost: $6 (1.2 TB ร $5/TB)
Zero infrastructure: No servers to provision or manage
Dataproc, Fast Hadoop/Spark Clusters
What it is: Managed Spark/Hadoop (like EMR)
Pricing: VM cost + 1ยข/vCPU/hour
Startup time: ~90 seconds (fastest!)
Auto-scaling: Add/remove workers automatically
Preemptible VMs: 80% cost savings
Best for: Spark jobs, batch processing
# Create ephemeral cluster (auto-deletes after job) gcloud dataproc jobs submit pyspark \ --cluster-name=temp-cluster \ --region=us-central1 \ --cluster-labels=ephemeral=true \ gs://my-bucket/etl-job.py # Use preemptible workers (80% cheaper) gcloud dataproc clusters create my-cluster \ --num-workers=50 \ --num-preemptible-workers=100 \ --worker-machine-type=n1-standard-4
Cost: 50 regular + 100 preemptible = ~$20/hour (vs $40 all regular)
Auto-delete: Cluster terminates when job finishes
Dataflow, Serverless Stream & Batch Processing
What it is: Apache Beam as a service
Pricing: $0.056/vCPU-hour + $0.0035/GB RAM
Auto-scaling: From 1 to 1000s workers
Best for: Real-time ETL, streaming analytics
# Python: Apache Beam pipeline
import json
import apache_beam as beam
with beam.Pipeline() as pipeline:
(pipeline
| 'Read from Pub/Sub' >> beam.io.ReadFromPubSub('projects/my-project/topics/events')
| 'Parse JSON' >> beam.Map(json.loads)
| 'Extract fields' >> beam.Map(lambda x: (x['user_id'], x['revenue']))
| 'Sum by user' >> beam.CombinePerKey(sum)
| 'Write to BigQuery' >> beam.io.WriteToBigQuery('project:dataset.user_revenue')
)Auto-scaling: Handles traffic spikes automatically
No servers: Fully managed infrastructure
Pub/Sub, Global Message Queue
What it is: Serverless messaging (like Kafka)
Throughput: 100M messages/second
Global: Multi-region by default
Best for: Event-driven architectures
# Python: Publish to Pub/Sub
from google.cloud import pubsub_v1
publisher = pubsub_v1.PublisherClient()
topic_path = publisher.topic_path('my-project', 'events')
# Publish message
future = publisher.publish(
topic_path,
b'{"user_id": "123", "action": "purchase"}',
event_type='purchase'
)
print(f"Published message ID: {future.result()}")Durability: Messages replicated across regions
At-least-once delivery: Guaranteed with acknowledgments
GCP Strengths & Weaknesses
โ Strengths
- Best data analytics (BigQuery)
- Leading ML/AI services
- Most serverless options
- Fastest cluster startup (Dataproc)
- Simple, predictable pricing
- Cleanest UI/UX
- Strong open-source contributions
โ Weaknesses
- Smallest market share (~11%)
- Fewer services overall
- Less enterprise adoption
- Smaller partner ecosystem
- Fewest regions globally
- Some services less mature
Service Comparison Across Clouds
| Category | AWS | Azure | GCP |
|---|---|---|---|
| Object Storage | S3 | Blob Storage / ADLS Gen2 | Cloud Storage |
| Data Warehouse | Redshift | Synapse (dedicated pool) | BigQuery โญ |
| Serverless SQL | Athena | Synapse (serverless pool) | BigQuery โญ |
| Hadoop/Spark | EMR | HDInsight | Dataproc โญ |
| Stream Processing | Kinesis | Event Hubs | Dataflow โญ |
| Message Queue | SQS / Kinesis | Event Hubs | Pub/Sub โญ |
| ETL Orchestration | Glue / Step Functions | Data Factory | Cloud Composer (Airflow) |
| ML Platform | SageMaker | Azure ML | Vertex AI โญ |
โญ = Generally considered best-in-class for that category
Pricing Comparison
Cloud pricing is complex and varies by region, but here's a rough comparison for common scenarios:
| Scenario | AWS | Azure | GCP |
|---|---|---|---|
| 1TB Storage/month | $23 (S3 Standard) | $18 (Blob Hot) | $20 (Standard) โ |
| Query 1TB data (serverless) | $5 (Athena) | $5 (Synapse serverless) | $5 (BigQuery) โ |
| 10-node Spark cluster/hour | ~$10 + 25% = $12.50 | ~$10 + 20% = $12 | ~$10 + 1ยข/vCPU = $10.40 โ |
| Data Warehouse (reserved) | Redshift: $0.25/hr/node | Synapse: $1.20/hr (DW100c) | BigQuery: $0.04/GB storage โ |
| Streaming (1M events) | Kinesis: $0.015 | Event Hubs: $0.028 | Pub/Sub: $0.040 |
Decision Framework: Which Cloud?
Choose Based on Your Situation:
Choose AWS if:
- You need the most comprehensive service catalog
- Global reach is critical (30+ regions)
- You want the largest ecosystem and community
- You're building a startup that might scale globally
- You need mature, battle-tested services
Choose Azure if:
- You're already using Microsoft products (Windows, SQL Server, AD)
- You have existing Microsoft Enterprise Agreements
- You need hybrid cloud (on-premise + cloud)
- You're in a regulated industry (strong compliance)
- You want unified analytics platform (Synapse)
Choose GCP if:
- Data analytics is your primary workload (BigQuery)
- You're building ML/AI-heavy applications
- You want serverless-first architecture
- You prefer simple, transparent pricing
- You value innovation over ecosystem size
- You're a data-intensive startup
Best Practices for Cloud Big Data
All clouds offer multiple storage tiers. Match your access pattern to the right tier.
| Access Pattern | Tier | Cost | Use Case |
|---|---|---|---|
| Daily access | Standard/Hot | $0.02/GB/mo | Active data lake |
| Monthly access | Infrequent Access | $0.01/GB/mo | Historical logs |
| Yearly access | Archive/Glacier | $0.004/GB/mo | Compliance backups |
Proper partitioning can reduce query costs by 10-100x by avoiding unnecessary data scans.
โ Good Partitioning
- By date: /year=2024/month=01/day=15/
- By region: /region=us-east/
- By category: /product_type=electronics/
- Query: WHERE date = '2024-01-15'
- Scans: Only 1 day's partition
โ Bad Partitioning
- By user_id: Too many partitions (millions)
- By minute: Too granular (expensive)
- No partitioning: Scans all data
- Query: WHERE user_id = '123'
- Scans: Entire dataset (wasteful)
Serverless eliminates idle costs, you only pay when queries run.
Scenario: 10 analysts running 50 queries/day Traditional Data Warehouse: - Cluster runs 24/7: $1.50/hour ร 720 hours = $1,080/month - Utilization: ~15% (most time idle) Serverless (BigQuery/Athena): - 50 queries ร 10 analysts ร 22 days = 11,000 queries - Average 100GB scanned per query - 11,000 ร 0.1TB ร $5 = $550/month - 49% cost savings!
Automatically move or delete old data to save costs without manual intervention.
# AWS S3 Lifecycle Policy
{
"Rules": [{
"Id": "Archive old logs",
"Status": "Enabled",
"Transitions": [
{
"Days": 90,
"StorageClass": "STANDARD_IA" // Move to Infrequent Access
},
{
"Days": 365,
"StorageClass": "GLACIER" // Archive after 1 year
}
],
"Expiration": {
"Days": 2555 // Delete after 7 years
}
}]
}Set once, saves money forever
Cloud costs can spiral out of control. Set up monitoring and budgets from day 1.
Essential Monitoring:
- Budget alerts: Email when 50%, 80%, 100% of budget spent
- Cost by service: Identify which services cost most
- Cost by team/project: Use tags/labels for chargeback
- Anomaly detection: Alert on unusual spikes
- Unused resources: Find idle clusters, old snapshots
For predictable, 24/7 workloads, commit to 1-3 years for 30-75% savings.
| Commitment | Discount | Best For |
|---|---|---|
| On-Demand | 0% (baseline) | Variable workloads |
| 1-Year Reserved | 30-40% off | Known steady usage |
| 3-Year Reserved | 50-75% off | Core infrastructure |
| Spot/Preemptible | 70-90% off | Fault-tolerant batch jobs |
Real-World Example: On-Premise to Cloud Migration
Case Study: E-Commerce Company Migration to AWS
Problem: 200TB data warehouse on-premise, aging infrastructure, 12-hour batch jobs, $800K/year operational costs
Migration Strategy:
Phase 1: Data Lake (Month 1-2)
- Move raw data to S3 (200TB)
- Partition by date/product
- Convert to Parquet format
- Cost: $4,600/month storage
Phase 2: Processing (Month 2-3)
- Migrate ETL to EMR
- Use spot instances (70% savings)
- Auto-terminate after jobs
- Batch jobs: 12hrs โ 2hrs
Phase 3: Analytics (Month 3-4)
- Set up Redshift cluster
- Load hot data (last 2 years)
- Athena for ad-hoc queries
- Query time: minutes โ seconds
Phase 4: Optimization (Month 4-6)
- Implement lifecycle policies
- Archive old data to Glacier
- Reserved instances for Redshift
- Cost monitoring dashboards
โข Total cloud cost: $280K/year (65% reduction)
โข Batch processing: 6x faster
โข Query performance: 50x improvement
โข Team reduced from 8 to 3 DBAs
โข ROI: 18 months payback period
Key Takeaways
- Cloud wins for 90% of companies, lower TCO, faster deployment, elastic scaling
- AWS = breadth, most services, largest ecosystem, global reach
- Azure = Microsoft stack, best hybrid cloud, enterprise integration
- GCP = analytics & ML, BigQuery, serverless-first, innovation
- Use right storage tier, 80% savings moving cold data to archive
- Partition your data, 10-100x cost reduction on queries
- Serverless for variable loads, pay only when processing
- Monitor costs religiously, set budgets and alerts from day 1