Instance fleets and instance groups are mutually exclusive. You must choose one model for the entire cluster. Setting any
*_instance_fleet variable will conflict with the corresponding *_instance_group variable.Fleet types
The module exposes three fleet variables, one per node role:| Variable | Node role | Resource |
|---|---|---|
master_instance_fleet | Master | Inline in aws_emr_cluster |
core_instance_fleet | Core | Inline in aws_emr_cluster |
task_instance_fleet | Task | Separate aws_emr_instance_fleet resource |
master_instance_fleet
master_instance_fleet
The master fleet controls the primary node that coordinates the cluster. For most clusters a single On-Demand master instance is sufficient.
Display name for the fleet.
Number of On-Demand capacity units to provision. For master nodes, set this to
1.Number of Spot capacity units to provision.
List of instance type configurations the fleet can choose from. See Instance type config for nested attributes.
Spot and On-Demand launch strategies. See Launch specifications for nested attributes.
core_instance_fleet
core_instance_fleet
The core fleet stores data in HDFS and runs compute tasks. You can split capacity across On-Demand and Spot to balance cost and resilience.
Display name for the fleet.
On-Demand capacity units to provision.
Spot capacity units to provision.
List of instance type configurations. See Instance type config.
Spot and On-Demand launch strategies. See Launch specifications.
task_instance_fleet
task_instance_fleet
The task fleet adds compute-only capacity to the cluster. Task nodes do not store HDFS data, making them safe to run entirely on Spot instances.
Display name for the fleet.
On-Demand capacity units to provision.
Spot capacity units to provision.
List of instance type configurations. See Instance type config.
Spot and On-Demand launch strategies. See Launch specifications.
Instance type config
Each entry ininstance_type_configs describes one instance type that the fleet may use.
EC2 instance type, for example
"m5.xlarge".Number of capacity units this instance type contributes toward the fleet’s target. When omitted, each instance counts as one unit.
Maximum Spot price in USD per instance-hour. Mutually exclusive with
bid_price_as_percentage_of_on_demand_price.Maximum Spot price expressed as a percentage of the current On-Demand price. Defaults to
60.EBS volumes to attach to each instance of this type.
size— Volume size in GiB. Default:256.type— EBS volume type. Default:"gp3".iops— Provisioned IOPS forio1/io2volumes.volumes_per_instance— Number of volumes to attach per instance.
Launch specifications
Launch specifications control how EMR fulfills Spot and On-Demand requests for the fleet.Spot specification
Strategy EMR uses to select Spot pools.
"capacity-optimized" prioritizes pools with the most available capacity, reducing interruption risk.Duration in minutes for a Spot block (defined-duration Spot). Allowed values:
60, 120, 180, 240, 300, 360. Set to 0 to disable.Action to take if Spot capacity cannot be provisioned within
timeout_duration_minutes. "SWITCH_TO_ON_DEMAND" falls back to On-Demand; "TERMINATE_CLUSTER" stops the launch.Minutes to wait for Spot capacity before taking
timeout_action.On-Demand specification
Strategy for selecting On-Demand instance pools. Currently only
"lowest-price" is supported.