Skip to main content

instance_fleets

Creates, updates, deletes, gets or lists an instance_fleets resource.

Overview

Nameinstance_fleets
TypeResource
Idaws.emr.instance_fleets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contextstringReserved. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>)
idstringThe unique identifier of the instance fleet.
instance_fleet_typestringThe node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK. (MASTER, CORE, TASK)
instance_type_specificationsarrayAn array of specifications for the instance types that comprise an instance fleet.
launch_specificationsobjectDescribes the launch specification for an instance fleet.
namestringA friendly name for the instance fleet. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>)
provisioned_on_demand_capacityintegerThe number of On-Demand units that have been provisioned for the instance fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might be less than or greater than TargetOnDemandCapacity.
provisioned_spot_capacityintegerThe number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity. This provisioned capacity might be less than or greater than TargetSpotCapacity.
resize_specificationsobjectThe resize specification for the instance fleet.
statusobjectThe current status of the instance fleet.
target_on_demand_capacityintegerThe target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand Instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity units that have been provisioned for the instance fleet. If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
target_spot_capacityintegerThe target capacity of Spot units for the instance fleet, which determines how many Spot Instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity units that have been provisioned for the instance fleet. If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_instance_fleetsselectregionLists all available details about the instance fleets in a cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
add_instance_fleetupdateregion, ClusterId, InstanceFleetAdds an instance fleet to a running cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.
modify_instance_fleetexecregion, ClusterId, InstanceFleetModifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists all available details about the instance fleets in a cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.

SELECT
context,
id,
instance_fleet_type,
instance_type_specifications,
launch_specifications,
name,
provisioned_on_demand_capacity,
provisioned_spot_capacity,
resize_specifications,
status,
target_on_demand_capacity,
target_spot_capacity
FROM aws.emr.instance_fleets
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Adds an instance fleet to a running cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.

UPDATE aws.emr.instance_fleets
SET
ClusterId = '{{ ClusterId }}',
InstanceFleet = '{{ InstanceFleet }}'
WHERE
region = '{{ region }}' --required
AND ClusterId = '{{ ClusterId }}' --required
AND InstanceFleet = '{{ InstanceFleet }}' --required
RETURNING
cluster_arn,
cluster_id,
instance_fleet_id;

Lifecycle Methods

Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.

EXEC aws.emr.instance_fleets.modify_instance_fleet
@region='{{ region }}' --required
@@json=
'{
"ClusterId": "{{ ClusterId }}",
"InstanceFleet": "{{ InstanceFleet }}"
}'
;