Based on the DEA-C01 exam guideReport an error
Even if a data pipeline runs well, it cannot be sustained if cost is not controlled. To cut cost, you first have to see "what spends how much."
aws:createdBy) and user-defined tags that you attach (Project, Environment, Team).Example tag strategy:
Project=orders-pipeline
Environment=prod
CostCenter=data-eng
→ In Cost Explorer, break down as "cost that data-eng spent on orders-pipeline in prod"💡 Related theory: For a long time cost allocation tags were known to "apply only to costs after the point of activation and not retroactively," and exam material may still present it that way. The current documentation has a feature where the management account can request a backfill of up to 12 months. However, a backfill only extends the activation status into the past, so if resources were not actually tagged during that period, no values are filled in. Deciding a tagging policy early and applying tags consistently is still the answer.
| Tool | When | What it does | Clue for choosing it |
|---|---|---|---|
| Cost Explorer | After the fact | Visualizes and forecasts cost trends by service, tag, and period | "Analyze where and how much was spent" |
| AWS Budgets | Configured in advance | Alerts or actions when a set budget or threshold is reached | "Alert when 80% of the monthly budget is reached" |
| Cost Anomaly Detection | Continuous | Learns usual patterns with ML and notifies of abnormal spikes | "An unexpected spike when you do not know the threshold" |
| Compute Optimizer | Periodic | Right-sizing recommendations for resources | "Whether an instance is oversized" |
| Service | Billing unit | Knobs that drive cost |
|---|---|---|
| Glue ETL | DPU × execution time | Worker type and count, execution time, Flex |
| EMR on EC2 | Instance hours (EC2 charge + EMR charge) | Instance type and count, Spot share, idle time |
| Lambda | Number of requests + memory × execution time | Memory setting, execution time |
| Athena | Amount of data scanned | Format, compression, partitions, workgroup limits |
| Redshift provisioned | Node hours | Node type and count, pause |
| Redshift Serverless | RPU × usage time | Base capacity, usage limits |
| Kinesis Data Streams | Provisioned: shard-hours; on-demand: data volume | Shard count, capacity mode |
| S3 | Storage + number of requests + transfer volume | Storage class, file count, lifecycle |
| Step Functions Standard | Number of state transitions | Retry count, loop structure |
One DPU is a relative unit equivalent to 4 vCPUs and 16GB of memory.
| Worker type | DPU per worker | vCPU / memory | Suitable workload |
|---|---|---|---|
| G.025X | 0.25 | 2 / 4GB | Low-volume streaming jobs only |
| G.1X | 1 | 4 / 16GB | Most transforms and joins |
| G.2X | 2 | 8 / 32GB | Most transforms and joins (when more memory is needed) |
| G.4X / G.8X | 4 / 8 | 16 / 64GB, 32 / 128GB | The heaviest transforms, aggregations, and joins |
| G.12X / G.16X | 12 / 16 | 48 / 192GB, 64 / 256GB | Very large workloads |
| R.1X to R.8X | 1 to 8 | Memory-optimized configurations | Memory-intensive jobs with frequent OOM |
--enable-auto-scaling) adds and removes workers on Glue 3.0 and above according to the parallelism of stages and micro-batches. In this case the number of workers you specify becomes an upper bound, not a "fixed number."# Run with Auto Scaling on, up to 20 workers
aws glue start-job-run \
--job-name orders-transform \
--worker-type G.2X --number-of-workers 20 \
--arguments '{"--enable-auto-scaling":"true"}'numberMaxNeededExecutors (the needed count) keeps exceeding numberAllExecutors (the actual count), workers are insufficient; if it is far below, you have too many.Under-provisioning: OOM, throttling, delay → SLA violation
Over-provisioning: idle resources → waste
Goal: a baseline fitted to the workload profile + auto scaling for the variation| Node | Role | Purchase option |
|---|---|---|
| Primary | Cluster coordination | On-Demand (if it drops, the cluster dies) |
| Core | Runs tasks + holds HDFS data | On-Demand or commitment |
| Task | Runs tasks only, holds no data | Spot |
| Parameter | Meaning |
|---|---|
MinimumCapacityUnits / MaximumCapacityUnits | Lower and upper bounds of cluster capacity (the primary node is not counted) |
MaximumOnDemandCapacityUnits | Upper bound that can be filled with On-Demand. Anything beyond is filled with Spot |
MaximumCoreCapacityUnits | Upper bound for core nodes. Anything beyond is filled with task nodes |
{
"ComputeLimits": {
"UnitType": "Instances",
"MinimumCapacityUnits": 2,
"MaximumCapacityUnits": 100,
"MaximumOnDemandCapacityUnits": 10,
"MaximumCoreCapacityUnits": 17
}
}| Feature | Variation it absorbs | How it works | Caution |
|---|---|---|---|
| Redshift Concurrency Scaling | Surges in concurrent queries | With Concurrency Scaling mode of a WLM queue set to auto, queries that would wait are sent to a temporary cluster | Billed only for the time queries actually run. Write operations are supported only on RA3 and RG nodes |
| Redshift Serverless | Overall usage | Uses RPUs only when there are queries | Advantageous for intermittent workloads |
| Kinesis on-demand | Ingest volume variation | The service manages shards | Provisioned is cheaper if traffic is steady |
| Glue Auto Scaling | Differences in parallelism per stage | Increases and decreases workers during the run | You set the upper bound yourself |
| EMR Managed Scaling | YARN backlog | Increases and decreases core and task nodes | YARN applications only |
max_concurrency_scaling_clusters. Free credits accrue based on main cluster usage, so short peaks can be handled at no extra cost.💡 Related theory: Auto scaling only absorbs "variation" and cannot fix a "wrong baseline." If the usual cost is high, do not touch the scaling upper bound; redo the baseline sizing. The order is always sizing → scaling.
| Option | Suitable usage | Place in a data pipeline |
|---|---|---|
| On-Demand | Unpredictable, short-term | New workloads, primary and core nodes |
| Savings Plans / Reserved | Predictable baseline | Always-on clusters, provisioned Redshift |
| Spot | Work that tolerates interruption | EMR task nodes, re-runnable batches |
SELECT * throws away the benefit of the columnar format.-- Bad example: all columns, no partition condition → full table scan
SELECT * FROM orders WHERE order_status = 'PAID';
-- Good example: only the needed columns, range limited by the partition column
SELECT order_id, amount FROM orders
WHERE dt BETWEEN '2026-06-01' AND '2026-06-07' AND order_status = 'PAID';| Symptom | Cause | Action |
|---|---|---|
| Tags do not appear in Cost Explorer | Tags not activated, or not the management account | Activate from the management account, wait up to 24 hours |
| Within budget but cost is several times usual | A spike below the Budgets threshold | Cost Anomaly Detection |
| Glue cost is large relative to the data volume | Too many workers, a hung job running to timeout | Re-size using executor metrics, Auto Scaling, shorten the timeout |
| EMR cost is incurred even on nights with no work | Idle cluster | Auto-termination policy, transient clusters |
| A job restarts from scratch on Spot reclaim | Core nodes are Spot | Core On-Demand, only tasks on Spot |
| A Redshift dashboard waits every morning | Insufficient concurrency | Concurrency Scaling |
| Athena cost balloons | Queries without partition conditions, row format | Per-query limit, Parquet and partitions |
| Usual cost is high even with auto scaling on | Baseline too large | Readjust minimum capacity and base sizing |
| Question clue | Answer |
|---|---|
| "Break down cost by project and environment" | Activate cost allocation tags + Cost Explorer |
| "Automatically detect unexpected cost spikes" | Cost Anomaly Detection |
| "Alert when a certain percentage of the budget is reached" | AWS Budgets |
| "Automatically adjust a Glue job's workers during the run" | Glue Auto Scaling |
| "Run a small script that does not need Spark cheaply" | Glue Python shell |
| "Reduce the cost of non-urgent Glue jobs" | Flex execution class |
| "EMR cost reduction + interruption tolerance" | Core On-Demand, task Spot |
| "Add capacity only when concurrent queries surge" | Redshift Concurrency Scaling |
| "An analyst's mistaken query scans several TB" | Athena workgroup per-query limit |
| "Directly reduce Athena and Spectrum query cost" | Parquet + compression + partition pruning |
Tomorrow we tie together this week's four topics (monitoring, quality, troubleshooting, cost) into a single operational flow for review.
Click a choice to reveal the answer and explanation.
Question 1
What should a data team do first when it wants to break down AWS costs by project and by environment?
Question 2
Which feature dynamically increases and decreases the number of workers during a Glue job run according to the needs of each stage, capturing both cost and performance?
Question 3
What is the typical pattern for configuring an EMR cluster to cut cost significantly while tolerating interruptions?
Question 4
What is the most effective way to directly reduce the query cost of Athena and Redshift Spectrum?
Question 5
Which service uses machine learning to automatically detect and notify you of abnormal spikes in AWS costs that differ from the usual?