This page requires JavaScript to display.
L
Unpacking...
← Advanced Data Engineering
Advanced Data Engineering

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.

Contents
1. Cloud Basics and the Cross-Cloud Service Map 2. Google Cloud: BigQuery, Cloud Storage, Dataflow, Dataproc 3. Azure: Synapse, Data Lake Storage, Data Factory, Azure Databricks 4. AWS Data Services: S3, RDS and Aurora, Glue, DMS 5. AWS Compute: EC2, Load Balancers, Auto Scaling, Lambda 6. AWS Security and Monitoring: IAM, KMS, CloudWatch, CloudTrail

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.

ConceptMeaning
Region / availability zoneA geographic area / an isolated data centre within it; spread across zones for resilience
Shared responsibilityThe provider secures the cloud; you secure what you put in it (IAM, data, configuration)
ElasticityScale up for a job and down after; pay for what you use
Managed vs serverlessManaged: you choose sizes; serverless: the service scales automatically and bills per use
NeedAWSAzureGoogle Cloud
Object storage / data lakeS3ADLS Gen2 (Blob Storage)Cloud Storage
Data warehouseRedshiftSynapse Analytics / Fabric WarehouseBigQuery
Managed SparkEMR, GlueAzure Databricks, Synapse Spark, FabricDataproc
Serverless ETL / pipelinesGlueData FactoryDataflow (Apache Beam)
OrchestrationMWAA (Airflow), Step FunctionsData Factory, Fabric pipelinesCloud Composer (Airflow)
StreamingKinesis, MSKEvent HubsPub/Sub
Database migration / CDCDMSDatabase Migration ServiceDatabase Migration Service, Datastream
Relational databaseRDS, AuroraAzure SQL Database, Azure Database for PostgreSQLCloud SQL, AlloyDB
Virtual machinesEC2Virtual MachinesCompute Engine
Serverless functionsLambdaAzure FunctionsCloud Run functions
Identity and accessIAMMicrosoft Entra ID + Azure RBACCloud IAM
Key managementKMSKey VaultCloud KMS
Monitoring / auditCloudWatch / CloudTrailAzure Monitor / Activity LogCloud Monitoring and Logging / Cloud Audit Logs

2. Google Cloud: BigQuery, Cloud Storage, Dataflow, Dataproc

ServiceWhat it isKey points for data engineers
BigQueryServerless columnar warehousePay 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 storageBuckets in a region, dual-region or multi-region; classes Standard, Nearline, Coldline, Archive; lifecycle rules; strong consistency
DataflowManaged Apache Beam runnerOne programming model for batch and streaming; autoscaling workers; exactly-once processing; event-time windows and watermarks built in
DataprocManaged Spark and HadoopClusters 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.

ChooseWhen
DataflowNew pipelines, especially streaming; want serverless autoscaling
DataprocExisting Spark/Hadoop code; need Spark libraries or cluster control
BigQuery SQLTransformations expressible in SQL (often with dbt)

3. Azure: Synapse, Data Lake Storage, Data Factory, Azure Databricks

ServiceWhat it isKey points for data engineers
Azure Data Lake Storage Gen2Blob Storage with a hierarchical namespaceReal 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 FactoryManaged data integration and orchestrationPipelines of activities (Copy, Data Flow, Databricks notebook, stored procedure); linked services and datasets; triggers; self-hosted integration runtime for on-premises sources
Azure Synapse AnalyticsAnalytics workspace: dedicated SQL pools (MPP), serverless SQL, Spark poolsDedicated 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 DatabricksFirst-party Databricks on AzureEntra 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

ServiceWhat it isKey points for data engineers
Amazon S3Object storage, the foundation of AWS data lakesBuckets 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 / AuroraManaged relational databasesRDS 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 GlueServerless data integrationData Catalog (Hive-compatible metastore used by Athena, EMR, Redshift Spectrum); crawlers infer schemas; Spark ETL jobs with job bookmarks; Glue Data Quality
AWS DMSDatabase Migration ServiceFull 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

ServiceWhat it isKey points
EC2Virtual serversInstance 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 BalancingDistributes traffic across targetsApplication 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 groupsKeep the right number of instancesMin, max and desired capacity; target tracking (e.g. keep CPU at 50%); scheduled and predictive scaling; replaces unhealthy instances
AWS LambdaServerless functionsRuns 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")
Output
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))
Output
[
 {
  "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

ServiceWhat it doesKey points
IAMWho can do what on which resourcesUsers, groups, roles (temporary credentials: use these for services and pipelines), policies in JSON; least privilege; identity-based and resource-based policies
KMSManaged encryption keysEnvelope encryption: a KMS key encrypts data keys, data keys encrypt data; key policies control use; automatic rotation; every use is logged in CloudTrail
CloudWatchMetrics, logs, alarms, dashboardsPipeline metrics and logs; alarms to SNS; Logs Insights queries; drives Auto Scaling
CloudTrailAudit log of API callsWho 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)}")
Output
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

SignalWhereAlert when
Job failures and durationCloudWatch metrics from Glue/EMR/Step FunctionsAny failure; duration above normal
Data freshnessCustom metric: minutes since last successful loadAbove the SLA
Errors in logsCloudWatch Logs metric filtersError count above threshold
Unexpected accessCloudTrail + GuardDuty / Security HubAccess from unusual principals or regions
CostAWS Budgets, Cost ExplorerSpend above forecast
Say this in the interview

"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."