‹ All DEA-C01 questions

DEA-C01 Practice Question 32: EMR Spot Task Nodes

AWS Certified Data Engineer – Associate (DEA-C01) · Test 4 · question 2 of 10

Data Ingestion and Transformationmedium

A nightly Spark batch runs on a long-lived Amazon EMR cluster of 1 primary and 40 core nodes, all On-Demand Instances. Finance wants the cluster's EC2 spend cut substantially. The job reads from and writes to Amazon S3, and a run that fails must be able to restart, but partial loss of intermediate shuffle capacity mid-run must not corrupt data or fail the cluster outright.

Which configuration reduces cost while keeping the cluster resilient?

Select one answer
Show answer and explanation

Answer:

  • B. Keep the primary and a small set of core nodes On-Demand, and add the remaining capacity as task nodes purchased as Spot Instances in an instance fleet with several instance types

Spot Instances "provide an option for you to purchase Amazon EC2 instance capacity at a reduced cost as compared to On-Demand purchasing. The disadvantage of using Spot Instances is that instances may terminate if Spot capacity becomes unavailable." The way to take that discount safely is to put Spot only where a termination is survivable. Task nodes run YARN containers but hold no HDFS data, so losing one costs a few re-run tasks and nothing else. The primary node is a single point of failure for the whole cluster, and core nodes carry HDFS blocks, so both stay On-Demand. Instance fleets add the second half of the answer: you set a target capacity and up to five instance types, so EMR can fulfil Spot capacity from whichever type and Availability Zone is available rather than being stranded on one.

Option A puts Spot exactly where it hurts most. A terminated primary node ends the cluster, and terminated core nodes take HDFS blocks with them. Setting a maximum price above On-Demand also removes most of the savings rationale.

Option C inverts the rule. The primary node runs the YARN ResourceManager and the cluster's coordination services; its loss terminates the cluster. It is the one node that must never be Spot.

Option D is not a cost optimization, it is a schedule change. Roughly the same instance-hours are consumed for the same work, at the same On-Demand rate, and a four-times-longer job is far more likely to overrun its window.

Reference: Instance purchasing options in Amazon EMR

Practice Test 4 ›

Study guides for DEA-C01