Skip to content

aws.emr.list_instance_fleets

Example SQL Queries

SELECT * FROM
aws.emr.list_instance_fleets
WHERE
"cluster_id" = 'VALUE';

Description

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.

Table Definition

Column NameColumn Data Type
cluster_id Required Input Column

The unique identifier of the cluster.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

id

The unique identifier of the instance fleet.

VARCHAR
instance_fleet_type

The node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK.

VARCHAR
instance_type_specifications

An array of specifications for the instance types that comprise an instance fleet.

STRUCT(
"instance_type" VARCHAR,
"weighted_capacity" BIGINT,
"bid_price" VARCHAR,
"bid_price_as_percentage_of_on_demand_price" DOUBLE,
"configurations" STRUCT(
"classification" VARCHAR,
"properties" MAP(VARCHAR, VARCHAR)
)[],
"ebs_block_devices" STRUCT(
"volume_specification" STRUCT(
"volume_type" VARCHAR,
"iops" BIGINT,
"size_in_gb" BIGINT,
"throughput" BIGINT
),
"device" VARCHAR
)[],
"ebs_optimized" BOOLEAN,
"custom_ami_id" VARCHAR,
"priority" DOUBLE
)[]
Show child fields
instance_type_specifications[]
Show child fields
instance_type_specifications[].bid_price

The bid price for each Amazon EC2 Spot Instance type as defined by InstanceType. Expressed in USD.

instance_type_specifications[].bid_price_as_percentage_of_on_demand_price

The bid price, as a percentage of On-Demand price, for each Amazon EC2 Spot Instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%).

instance_type_specifications[].configurations[]
Show child fields
instance_type_specifications[].configurations[].classification

The classification within a configuration.

instance_type_specifications[].configurations[].properties

A set of properties specified within a configuration classification.

instance_type_specifications[].custom_ami_id

The custom AMI ID to use for the instance type.

instance_type_specifications[].ebs_block_devices[]
Show child fields
instance_type_specifications[].ebs_block_devices[].device

The device name that is exposed to the instance, such as /dev/sdh.

instance_type_specifications[].ebs_block_devices[].volume_specification

EBS volume specifications such as volume type, IOPS, size (GiB) and throughput (MiB/s) that are requested for the EBS volume attached to an Amazon EC2 instance in the cluster.

Show child fields
instance_type_specifications[].ebs_block_devices[].volume_specification.iops

The number of I/O operations per second (IOPS) that the volume supports.

instance_type_specifications[].ebs_block_devices[].volume_specification.size_in_gb

The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.

instance_type_specifications[].ebs_block_devices[].volume_specification.throughput

The throughput, in mebibyte per second (MiB/s). This optional parameter can be a number from 125 - 1000 and is valid only for gp3 volumes.

instance_type_specifications[].ebs_block_devices[].volume_specification.volume_type

The volume type. Volume types supported are gp3, gp2, io1, st1, sc1, and standard.

instance_type_specifications[].ebs_optimized

Evaluates to TRUE when the specified InstanceType is EBS-optimized.

instance_type_specifications[].instance_type

The Amazon EC2 instance type, for example m3.xlarge.

instance_type_specifications[].priority

The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type. Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.

instance_type_specifications[].weighted_capacity

The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. Capacity values represent performance characteristics such as vCPUs, memory, or I/O. If not specified, the default value is 1.

launch_specifications

Describes the launch specification for an instance fleet.

STRUCT(
"spot_specification" STRUCT(
"timeout_duration_minutes" BIGINT,
"timeout_action" VARCHAR,
"block_duration_minutes" BIGINT,
"allocation_strategy" VARCHAR
),
"on_demand_specification" STRUCT(
"allocation_strategy" VARCHAR,
"capacity_reservation_options" STRUCT(
"usage_strategy" VARCHAR,
"capacity_reservation_preference" VARCHAR,
"capacity_reservation_resource_group_arn" VARCHAR
)
)
)
Show child fields
launch_specifications.on_demand_specification

The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR releases 5.12.1 and later.

Show child fields
launch_specifications.on_demand_specification.allocation_strategy

Specifies the strategy to use in launching On-Demand instance fleets. Available options are lowest-price and prioritized. lowest-price specifies to launch the instances with the lowest price first, and prioritized specifies that Amazon EMR should launch the instances with the highest priority first. The default is lowest-price.

launch_specifications.on_demand_specification.capacity_reservation_options

The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.

Show child fields
launch_specifications.on_demand_specification.capacity_reservation_options.capacity_reservation_preference

Indicates the instance's Capacity Reservation preferences. Possible preferences include:

  • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

  • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

launch_specifications.on_demand_specification.capacity_reservation_options.capacity_reservation_resource_group_arn

The ARN of the Capacity Reservation resource group in which to run the instance.

launch_specifications.on_demand_specification.capacity_reservation_options.usage_strategy

Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price).

If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.

launch_specifications.spot_specification

The launch specification for Spot instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.

Show child fields
launch_specifications.spot_specification.allocation_strategy

Specifies one of the following strategies to launch Spot Instance fleets: capacity-optimized, price-capacity-optimized, lowest-price, or diversified, and capacity-optimized-prioritized. For more information on the provisioning strategies, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide for Linux Instances.

When you launch a Spot Instance fleet with the old console, it automatically launches with the capacity-optimized strategy. You can't change the allocation strategy from the old console.

launch_specifications.spot_specification.block_duration_minutes

The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot Instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.

Spot Instances with a defined duration (also known as Spot blocks) are no longer available to new customers from July 1, 2021. For customers who have previously used the feature, we will continue to support Spot Instances with a defined duration until December 31, 2022.

launch_specifications.spot_specification.timeout_action

The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

launch_specifications.spot_specification.timeout_duration_minutes

The Spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

name

A friendly name for the instance fleet.

VARCHAR
provisioned_on_demand_capacity

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

BIGINT
provisioned_spot_capacity

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

BIGINT
resize_specifications

The resize specification for the instance fleet.

STRUCT(
"spot_resize_specification" STRUCT(
"timeout_duration_minutes" BIGINT
),
"on_demand_resize_specification" STRUCT(
"timeout_duration_minutes" BIGINT
)
)
Show child fields
resize_specifications.on_demand_resize_specification

The resize specification for On-Demand Instances in the instance fleet, which contains the resize timeout period.

Show child fields
resize_specifications.on_demand_resize_specification.timeout_duration_minutes

On-Demand resize timeout in minutes. If On-Demand Instances are not provisioned within this time, the resize workflow stops. The minimum value is 5 minutes, and the maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

resize_specifications.spot_resize_specification

The resize specification for Spot Instances in the instance fleet, which contains the resize timeout period.

Show child fields
resize_specifications.spot_resize_specification.timeout_duration_minutes

Spot resize timeout in minutes. If Spot Instances are not provisioned within this time, the resize workflow will stop provisioning of Spot instances. Minimum value is 5 minutes and maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

status

The current status of the instance fleet.

STRUCT(
"state" VARCHAR,
"state_change_reason" STRUCT(
"code" VARCHAR,
"message" VARCHAR
),
"timeline" STRUCT(
"creation_date_time" TIMESTAMP_S,
"ready_date_time" TIMESTAMP_S,
"end_date_time" TIMESTAMP_S
)
)
Show child fields
status.state

A code representing the instance fleet status.

  • PROVISIONING—The instance fleet is provisioning Amazon EC2 resources and is not yet ready to run jobs.

  • BOOTSTRAPPING—Amazon EC2 instances and other resources have been provisioned and the bootstrap actions specified for the instances are underway.

  • RUNNING—Amazon EC2 instances and other resources are running. They are either executing jobs or waiting to execute jobs.

  • RESIZING—A resize operation is underway. Amazon EC2 instances are either being added or removed.

  • SUSPENDED—A resize operation could not complete. Existing Amazon EC2 instances are running, but instances can't be added or removed.

  • TERMINATING—The instance fleet is terminating Amazon EC2 instances.

  • TERMINATED—The instance fleet is no longer active, and all Amazon EC2 instances have been terminated.

status.state_change_reason

Provides status change reason details for the instance fleet.

Show child fields
status.state_change_reason.code

A code corresponding to the reason the state change occurred.

status.state_change_reason.message

An explanatory message.

status.timeline

Provides historical timestamps for the instance fleet, including the time of creation, the time it became ready to run jobs, and the time of termination.

Show child fields
status.timeline.creation_date_time

The time and date the instance fleet was created.

status.timeline.end_date_time

The time and date the instance fleet terminated.

status.timeline.ready_date_time

The time and date the instance fleet was ready to run jobs.

target_on_demand_capacity

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

BIGINT
target_spot_capacity

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

BIGINT