Cloud Data Services: GCP, Azure, AWS
The data services of all three major clouds side by side: storage, processing, databases, compute, security and monitoring, with a cross-cloud service map.
1. Cloud Basics and the Cross-Cloud Service Map
Cloud computing rents compute, storage and managed services on demand, paid by use. The three service models are IaaS (virtual machines: you manage the OS), PaaS (managed platforms: you manage code and data) and SaaS (finished applications). Data platforms mostly use PaaS and serverless services.
| Concept | Meaning |
|---|---|
| Region / availability zone | A geographic area / an isolated data centre within it; spread across zones for resilience |
| Shared responsibility | The provider secures the cloud; you secure what you put in it (IAM, data, configuration) |
| Elasticity | Scale up for a job and down after; pay for what you use |
| Managed vs serverless | Managed: you choose sizes; serverless: the service scales automatically and bills per use |
| Need | AWS | Azure | Google Cloud |
|---|---|---|---|
| Object storage / data lake | S3 | ADLS Gen2 (Blob Storage) | Cloud Storage |
| Data warehouse | Redshift | Synapse Analytics / Fabric Warehouse | BigQuery |
| Managed Spark | EMR, Glue | Azure Databricks, Synapse Spark, Fabric | Dataproc |
| Serverless ETL / pipelines | Glue | Data Factory | Dataflow (Apache Beam) |
| Orchestration | MWAA (Airflow), Step Functions | Data Factory, Fabric pipelines | Cloud Composer (Airflow) |
| Streaming | Kinesis, MSK | Event Hubs | Pub/Sub |
| Database migration / CDC | DMS | Database Migration Service | Database Migration Service, Datastream |
| Relational database | RDS, Aurora | Azure SQL Database, Azure Database for PostgreSQL | Cloud SQL, AlloyDB |
| Virtual machines | EC2 | Virtual Machines | Compute Engine |
| Serverless functions | Lambda | Azure Functions | Cloud Run functions |
| Identity and access | IAM | Microsoft Entra ID + Azure RBAC | Cloud IAM |
| Key management | KMS | Key Vault | Cloud KMS |
| Monitoring / audit | CloudWatch / CloudTrail | Azure Monitor / Activity Log | Cloud Monitoring and Logging / Cloud Audit Logs |
2. Google Cloud: BigQuery, Cloud Storage, Dataflow, Dataproc
| Service | What it is | Key points for data engineers |
|---|---|---|
| BigQuery | Serverless columnar warehouse | Pay per TB scanned or by slot reservation; partition and cluster tables; nested and repeated fields; BigQuery ML; BigLake for open formats (see the Data Engineering Tools card) |
| Cloud Storage (GCS) | Object storage | Buckets in a region, dual-region or multi-region; classes Standard, Nearline, Coldline, Archive; lifecycle rules; strong consistency |
| Dataflow | Managed Apache Beam runner | One programming model for batch and streaming; autoscaling workers; exactly-once processing; event-time windows and watermarks built in |
| Dataproc | Managed Spark and Hadoop | Clusters in about 90 seconds, or Dataproc Serverless for Spark batches; reads GCS directly; good for migrating existing Spark/Hadoop jobs |
Dataflow (Apache Beam): count events per user in 1-minute windows
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.transforms.window import FixedWindows
opts = PipelineOptions(runner="DataflowRunner", project="my-project", region="asia-south1",
streaming=True, temp_location="gs://my-bucket/tmp")
with beam.Pipeline(options=opts) as p:
(p | "Read" >> beam.io.ReadFromPubSub(topic="projects/my-project/topics/clicks")
| "Parse" >> beam.Map(lambda b: b.decode().split(",")[0]) # user_id
| "Window" >> beam.WindowInto(FixedWindows(60))
| "Count" >> beam.combiners.Count.PerElement()
| "Format" >> beam.Map(lambda kv: {"user_id": kv[0], "clicks": kv[1]})
| "Write" >> beam.io.WriteToBigQuery("my-project:analytics.clicks_per_minute",
schema="user_id:STRING,clicks:INTEGER"))
gcloud storage buckets create gs://acme-landing --location=asia-south1
gcloud dataproc batches submit pyspark gs://acme-code/daily_job.py --region=asia-south1 \
-- --run-date=2026-03-01
Google Cloud commands and Beam pipeline: follows the official syntax but was not executed here, because it needs a live cloud account or service.
| Choose | When |
|---|---|
| Dataflow | New pipelines, especially streaming; want serverless autoscaling |
| Dataproc | Existing Spark/Hadoop code; need Spark libraries or cluster control |
| BigQuery SQL | Transformations expressible in SQL (often with dbt) |
3. Azure: Synapse, Data Lake Storage, Data Factory, Azure Databricks
| Service | What it is | Key points for data engineers |
|---|---|---|
| Azure Data Lake Storage Gen2 | Blob Storage with a hierarchical namespace | Real directories (atomic renames, folder ACLs) on top of cheap blob storage; hot, cool, cold and archive tiers; the lake under Databricks and Synapse |
| Azure Data Factory | Managed data integration and orchestration | Pipelines of activities (Copy, Data Flow, Databricks notebook, stored procedure); linked services and datasets; triggers; self-hosted integration runtime for on-premises sources |
| Azure Synapse Analytics | Analytics workspace: dedicated SQL pools (MPP), serverless SQL, Spark pools | Dedicated pools: distribution (hash, round-robin, replicate) matters; serverless SQL queries files in the lake. Microsoft now positions Fabric as the successor for new projects |
| Azure Databricks | First-party Databricks on Azure | Entra ID single sign-on, Unity Catalog, Delta on ADLS; the usual engine for heavy ETL and ML on Azure |
A typical Azure pipeline
on-prem SQL Server --(self-hosted IR)--> ADF Copy activity --> ADLS Gen2 /landing
|
ADF triggers Azure Databricks notebook (bronze -> silver -> gold, Delta)
|
Synapse serverless SQL / Fabric / Power BI read gold tables
{
"name": "pl_orders_daily",
"properties": {
"activities": [
{ "name": "CopyOrders", "type": "Copy",
"inputs": [{ "referenceName": "ds_sqlserver_orders", "type": "DatasetReference" }],
"outputs": [{ "referenceName": "ds_adls_orders_landing", "type": "DatasetReference" }],
"typeProperties": { "source": { "type": "SqlServerSource" }, "sink": { "type": "ParquetSink" } } },
{ "name": "TransformOrders", "type": "DatabricksNotebook",
"dependsOn": [{ "activity": "CopyOrders", "dependencyConditions": ["Succeeded"] }],
"typeProperties": { "notebookPath": "/pipelines/orders_silver_gold",
"baseParameters": { "run_date": "@pipeline().parameters.run_date" } } }
],
"parameters": { "run_date": { "type": "string" } }
}
}
The JSON above is checked for validity at build time; deploying it needs an Azure subscription. In practice ADF pipelines are authored in the studio, stored in Git and deployed with ARM/Bicep templates through CI/CD.
Deep dive: the Azure guide covers this in more depth.
4. AWS Data Services: S3, RDS and Aurora, Glue, DMS
| Service | What it is | Key points for data engineers |
|---|---|---|
| Amazon S3 | Object storage, the foundation of AWS data lakes | Buckets and keys (prefixes, not real folders); strong read-after-write consistency; storage classes from Standard to Glacier Deep Archive; lifecycle rules; versioning; event notifications; encryption by default |
| RDS / Aurora | Managed relational databases | RDS runs MySQL, PostgreSQL, Oracle, SQL Server, MariaDB; Aurora is AWS's cloud-native MySQL/PostgreSQL-compatible engine with storage replicated six ways across three AZs; Multi-AZ for failover, read replicas for scale |
| AWS Glue | Serverless data integration | Data Catalog (Hive-compatible metastore used by Athena, EMR, Redshift Spectrum); crawlers infer schemas; Spark ETL jobs with job bookmarks; Glue Data Quality |
| AWS DMS | Database Migration Service | Full load plus ongoing CDC from Oracle, SQL Server, MySQL, PostgreSQL to targets such as S3, Redshift, Aurora, Kinesis; requires source logging (binlog, supplemental logging) |
aws s3 cp orders_2026-03-01.parquet s3://acme-lake/landing/orders/dt=2026-03-01/
aws s3api put-bucket-lifecycle-configuration --bucket acme-lake --lifecycle-configuration file://lifecycle.json
aws glue start-crawler --name orders_landing_crawler
aws glue start-job-run --job-name orders_silver --arguments '{"--run_date":"2026-03-01"}'
aws dms start-replication-task --replication-task-arn arn:aws:dms:...:task:orders-cdc \
--start-replication-task-type start-replication
AWS CLI commands: follows the official syntax but was not executed here, because it needs a live cloud account or service.
Deep dives: Amazon S3, RDS & Aurora, AWS Glue, AWS DMS.
5. AWS Compute: EC2, Load Balancers, Auto Scaling, Lambda
| Service | What it is | Key points |
|---|---|---|
| EC2 | Virtual servers | Instance families: general (m), compute (c), memory (r) for Spark executors, storage (i, d); On-Demand, Reserved/Savings Plans, Spot (up to ~90% cheaper, can be reclaimed: fine for stateless Spark workers) |
| Elastic Load Balancing | Distributes traffic across targets | Application LB (HTTP, layer 7, path routing), Network LB (TCP/UDP, layer 4, very low latency), Gateway LB (appliances); health checks remove unhealthy instances |
| Auto Scaling groups | Keep the right number of instances | Min, max and desired capacity; target tracking (e.g. keep CPU at 50%); scheduled and predictive scaling; replaces unhealthy instances |
| AWS Lambda | Serverless functions | Runs code on events (S3, SQS, Kinesis, EventBridge, API Gateway); up to 15 minutes and 10 GB memory per invocation; pay per request and duration; ideal for light, event-driven glue, not heavy ETL |
EC2 + Load Balancer + Auto Scaling together
users --> Application Load Balancer --health checks--> target group
| EC2 EC2 EC2 (Auto Scaling group,
| across 3 AZs min 2, max 10)
CloudWatch alarm / target tracking --+--> add or remove instances
How target-tracking scaling decides capacity
import math
def desired_capacity(current, metric, target, min_size=2, max_size=10):
"""Target tracking: scale so the metric returns to the target (simplified)."""
wanted = math.ceil(current * metric / target)
return max(min_size, min(max_size, wanted))
for cpu in [20, 50, 80, 140]:
print(f"4 instances at {cpu:>3}% CPU, target 50% -> {desired_capacity(4, cpu, 50)} instances")4 instances at 20% CPU, target 50% -> 2 instances 4 instances at 50% CPU, target 50% -> 4 instances 4 instances at 80% CPU, target 50% -> 7 instances 4 instances at 140% CPU, target 50% -> 10 instances
A Lambda handler for S3 events
import json, urllib.parse
def handler(event, context):
"""Triggered when a file lands in s3://acme-lake/landing/. Validates and routes it."""
results = []
for record in event["Records"]:
bucket = record["s3"]["bucket"]["name"]
key = urllib.parse.unquote_plus(record["s3"]["object"]["key"])
size = record["s3"]["object"]["size"]
if size == 0 or not key.endswith(".parquet"):
results.append({"key": key, "action": "quarantine"})
else:
results.append({"key": key, "action": "start_glue_job"}) # e.g. boto3 glue.start_job_run
return {"statusCode": 200, "body": json.dumps(results)}
sample_event = {"Records": [
{"s3": {"bucket": {"name": "acme-lake"}, "object": {"key": "landing/orders/dt%3D2026-03-01/part-0.parquet", "size": 52311}}},
{"s3": {"bucket": {"name": "acme-lake"}, "object": {"key": "landing/orders/readme.txt", "size": 120}}},
]}
print(json.dumps(json.loads(handler(sample_event, None)["body"]), indent=1))[
{
"key": "landing/orders/dt=2026-03-01/part-0.parquet",
"action": "start_glue_job"
},
{
"key": "landing/orders/readme.txt",
"action": "quarantine"
}
]
The handler logic runs locally against a sample S3 event, which is also how Lambda functions should be unit-tested. Keep Lambda functions small, idempotent (S3 can deliver an event more than once), and hand heavy processing to Glue, EMR or Step Functions.
Deep dive: AWS Lambda and AWS Overview.
6. AWS Security and Monitoring: IAM, KMS, CloudWatch, CloudTrail
| Service | What it does | Key points |
|---|---|---|
| IAM | Who can do what on which resources | Users, groups, roles (temporary credentials: use these for services and pipelines), policies in JSON; least privilege; identity-based and resource-based policies |
| KMS | Managed encryption keys | Envelope encryption: a KMS key encrypts data keys, data keys encrypt data; key policies control use; automatic rotation; every use is logged in CloudTrail |
| CloudWatch | Metrics, logs, alarms, dashboards | Pipeline metrics and logs; alarms to SNS; Logs Insights queries; drives Auto Scaling |
| CloudTrail | Audit log of API calls | Who did what, when, from where; management events by default, data events (e.g. S3 object reads) optional; deliver trails to S3 for retention |
How IAM evaluates a request
AWS starts from an implicit deny. An explicit Allow grants access, but any matching explicit Deny wins over every Allow. This simplified evaluator shows the logic:
import fnmatch
policies = [
{"Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject"], "Resource": ["arn:aws:s3:::acme-lake/silver/*"]},
{"Effect": "Allow", "Action": ["s3:GetObject"], "Resource": ["arn:aws:s3:::acme-lake/*"]},
{"Effect": "Deny", "Action": ["s3:*"], "Resource": ["arn:aws:s3:::acme-lake/restricted/*"]},
]
def evaluate(action, resource):
def matches(stmt):
return (any(fnmatch.fnmatch(action, a) for a in stmt["Action"]) and
any(fnmatch.fnmatch(resource, r) for r in stmt["Resource"]))
hits = [s for s in policies if matches(s)]
if any(s["Effect"] == "Deny" for s in hits):
return "DENY (explicit)"
if any(s["Effect"] == "Allow" for s in hits):
return "ALLOW"
return "DENY (implicit)"
for action, key in [("s3:PutObject", "silver/orders/p1.parquet"), ("s3:GetObject", "gold/kpi.parquet"),
("s3:PutObject", "gold/kpi.parquet"), ("s3:GetObject", "restricted/salaries.csv")]:
print(f"{action:13} {key:28} -> {evaluate(action, 'arn:aws:s3:::acme-lake/' + key)}")s3:PutObject silver/orders/p1.parquet -> ALLOW s3:GetObject gold/kpi.parquet -> ALLOW s3:PutObject gold/kpi.parquet -> DENY (implicit) s3:GetObject restricted/salaries.csv -> DENY (explicit)
Real IAM also considers resource policies, permission boundaries, session policies and organisation SCPs, but the core rule is the same: explicit deny, then explicit allow, otherwise deny. Use IAM Access Analyzer and the policy simulator to check real policies.
Monitoring a pipeline
| Signal | Where | Alert when |
|---|---|---|
| Job failures and duration | CloudWatch metrics from Glue/EMR/Step Functions | Any failure; duration above normal |
| Data freshness | Custom metric: minutes since last successful load | Above the SLA |
| Errors in logs | CloudWatch Logs metric filters | Error count above threshold |
| Unexpected access | CloudTrail + GuardDuty / Security Hub | Access from unusual principals or regions |
| Cost | AWS Budgets, Cost Explorer | Spend above forecast |
"On AWS I land data in S3, catalogue it with Glue, replicate databases with DMS, transform with Glue or EMR, and keep light event-driven logic in Lambda. Security is IAM roles with least privilege, where explicit deny beats allow, KMS envelope encryption with key policies, and CloudTrail for audit. CloudWatch provides metrics, logs and alarms, including freshness SLAs."