aws-cdk-lib.aws_emr.CfnCluster.JobFlowInstancesConfigProperty

interface JobFlowInstancesConfigProperty

LanguageType name
.NETAmazon.CDK.AWS.EMR.CfnCluster.JobFlowInstancesConfigProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsemr#CfnCluster_JobFlowInstancesConfigProperty
Javasoftware.amazon.awscdk.services.emr.CfnCluster.JobFlowInstancesConfigProperty
Pythonaws_cdk.aws_emr.CfnCluster.JobFlowInstancesConfigProperty
TypeScript aws-cdk-lib » aws_emr » CfnCluster » JobFlowInstancesConfigProperty

JobFlowInstancesConfig is a property of the AWS::EMR::Cluster resource.

JobFlowInstancesConfig defines the instance groups or instance fleets that comprise the cluster. JobFlowInstancesConfig must contain either InstanceFleetConfig or InstanceGroupConfig . They cannot be used together.

You can now define task instance groups or task instance fleets using the TaskInstanceGroups and TaskInstanceFleets subproperties. Using these subproperties reduces delays in provisioning task nodes compared to specifying task nodes with the InstanceFleetConfig and InstanceGroupConfig resources.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_emr as emr } from 'aws-cdk-lib';

declare const configurationProperty_: emr.CfnCluster.ConfigurationProperty;
const jobFlowInstancesConfigProperty: emr.CfnCluster.JobFlowInstancesConfigProperty = {
  additionalMasterSecurityGroups: ['additionalMasterSecurityGroups'],
  additionalSlaveSecurityGroups: ['additionalSlaveSecurityGroups'],
  coreInstanceFleet: {
    instanceTypeConfigs: [{
      instanceType: 'instanceType',

      // the properties below are optional
      bidPrice: 'bidPrice',
      bidPriceAsPercentageOfOnDemandPrice: 123,
      configurations: [{
        classification: 'classification',
        configurationProperties: {
          configurationPropertiesKey: 'configurationProperties',
        },
        configurations: [configurationProperty_],
      }],
      customAmiId: 'customAmiId',
      ebsConfiguration: {
        ebsBlockDeviceConfigs: [{
          volumeSpecification: {
            sizeInGb: 123,
            volumeType: 'volumeType',

            // the properties below are optional
            iops: 123,
          },

          // the properties below are optional
          volumesPerInstance: 123,
        }],
        ebsOptimized: false,
      },
      weightedCapacity: 123,
    }],
    launchSpecifications: {
      onDemandSpecification: {
        allocationStrategy: 'allocationStrategy',
      },
      spotSpecification: {
        timeoutAction: 'timeoutAction',
        timeoutDurationMinutes: 123,

        // the properties below are optional
        allocationStrategy: 'allocationStrategy',
        blockDurationMinutes: 123,
      },
    },
    name: 'name',
    targetOnDemandCapacity: 123,
    targetSpotCapacity: 123,
  },
  coreInstanceGroup: {
    instanceCount: 123,
    instanceType: 'instanceType',

    // the properties below are optional
    autoScalingPolicy: {
      constraints: {
        maxCapacity: 123,
        minCapacity: 123,
      },
      rules: [{
        action: {
          simpleScalingPolicyConfiguration: {
            scalingAdjustment: 123,

            // the properties below are optional
            adjustmentType: 'adjustmentType',
            coolDown: 123,
          },

          // the properties below are optional
          market: 'market',
        },
        name: 'name',
        trigger: {
          cloudWatchAlarmDefinition: {
            comparisonOperator: 'comparisonOperator',
            metricName: 'metricName',
            period: 123,
            threshold: 123,

            // the properties below are optional
            dimensions: [{
              key: 'key',
              value: 'value',
            }],
            evaluationPeriods: 123,
            namespace: 'namespace',
            statistic: 'statistic',
            unit: 'unit',
          },
        },

        // the properties below are optional
        description: 'description',
      }],
    },
    bidPrice: 'bidPrice',
    configurations: [{
      classification: 'classification',
      configurationProperties: {
        configurationPropertiesKey: 'configurationProperties',
      },
      configurations: [configurationProperty_],
    }],
    customAmiId: 'customAmiId',
    ebsConfiguration: {
      ebsBlockDeviceConfigs: [{
        volumeSpecification: {
          sizeInGb: 123,
          volumeType: 'volumeType',

          // the properties below are optional
          iops: 123,
        },

        // the properties below are optional
        volumesPerInstance: 123,
      }],
      ebsOptimized: false,
    },
    market: 'market',
    name: 'name',
  },
  ec2KeyName: 'ec2KeyName',
  ec2SubnetId: 'ec2SubnetId',
  ec2SubnetIds: ['ec2SubnetIds'],
  emrManagedMasterSecurityGroup: 'emrManagedMasterSecurityGroup',
  emrManagedSlaveSecurityGroup: 'emrManagedSlaveSecurityGroup',
  hadoopVersion: 'hadoopVersion',
  keepJobFlowAliveWhenNoSteps: false,
  masterInstanceFleet: {
    instanceTypeConfigs: [{
      instanceType: 'instanceType',

      // the properties below are optional
      bidPrice: 'bidPrice',
      bidPriceAsPercentageOfOnDemandPrice: 123,
      configurations: [{
        classification: 'classification',
        configurationProperties: {
          configurationPropertiesKey: 'configurationProperties',
        },
        configurations: [configurationProperty_],
      }],
      customAmiId: 'customAmiId',
      ebsConfiguration: {
        ebsBlockDeviceConfigs: [{
          volumeSpecification: {
            sizeInGb: 123,
            volumeType: 'volumeType',

            // the properties below are optional
            iops: 123,
          },

          // the properties below are optional
          volumesPerInstance: 123,
        }],
        ebsOptimized: false,
      },
      weightedCapacity: 123,
    }],
    launchSpecifications: {
      onDemandSpecification: {
        allocationStrategy: 'allocationStrategy',
      },
      spotSpecification: {
        timeoutAction: 'timeoutAction',
        timeoutDurationMinutes: 123,

        // the properties below are optional
        allocationStrategy: 'allocationStrategy',
        blockDurationMinutes: 123,
      },
    },
    name: 'name',
    targetOnDemandCapacity: 123,
    targetSpotCapacity: 123,
  },
  masterInstanceGroup: {
    instanceCount: 123,
    instanceType: 'instanceType',

    // the properties below are optional
    autoScalingPolicy: {
      constraints: {
        maxCapacity: 123,
        minCapacity: 123,
      },
      rules: [{
        action: {
          simpleScalingPolicyConfiguration: {
            scalingAdjustment: 123,

            // the properties below are optional
            adjustmentType: 'adjustmentType',
            coolDown: 123,
          },

          // the properties below are optional
          market: 'market',
        },
        name: 'name',
        trigger: {
          cloudWatchAlarmDefinition: {
            comparisonOperator: 'comparisonOperator',
            metricName: 'metricName',
            period: 123,
            threshold: 123,

            // the properties below are optional
            dimensions: [{
              key: 'key',
              value: 'value',
            }],
            evaluationPeriods: 123,
            namespace: 'namespace',
            statistic: 'statistic',
            unit: 'unit',
          },
        },

        // the properties below are optional
        description: 'description',
      }],
    },
    bidPrice: 'bidPrice',
    configurations: [{
      classification: 'classification',
      configurationProperties: {
        configurationPropertiesKey: 'configurationProperties',
      },
      configurations: [configurationProperty_],
    }],
    customAmiId: 'customAmiId',
    ebsConfiguration: {
      ebsBlockDeviceConfigs: [{
        volumeSpecification: {
          sizeInGb: 123,
          volumeType: 'volumeType',

          // the properties below are optional
          iops: 123,
        },

        // the properties below are optional
        volumesPerInstance: 123,
      }],
      ebsOptimized: false,
    },
    market: 'market',
    name: 'name',
  },
  placement: {
    availabilityZone: 'availabilityZone',
  },
  serviceAccessSecurityGroup: 'serviceAccessSecurityGroup',
  taskInstanceFleets: [{
    instanceTypeConfigs: [{
      instanceType: 'instanceType',

      // the properties below are optional
      bidPrice: 'bidPrice',
      bidPriceAsPercentageOfOnDemandPrice: 123,
      configurations: [{
        classification: 'classification',
        configurationProperties: {
          configurationPropertiesKey: 'configurationProperties',
        },
        configurations: [configurationProperty_],
      }],
      customAmiId: 'customAmiId',
      ebsConfiguration: {
        ebsBlockDeviceConfigs: [{
          volumeSpecification: {
            sizeInGb: 123,
            volumeType: 'volumeType',

            // the properties below are optional
            iops: 123,
          },

          // the properties below are optional
          volumesPerInstance: 123,
        }],
        ebsOptimized: false,
      },
      weightedCapacity: 123,
    }],
    launchSpecifications: {
      onDemandSpecification: {
        allocationStrategy: 'allocationStrategy',
      },
      spotSpecification: {
        timeoutAction: 'timeoutAction',
        timeoutDurationMinutes: 123,

        // the properties below are optional
        allocationStrategy: 'allocationStrategy',
        blockDurationMinutes: 123,
      },
    },
    name: 'name',
    targetOnDemandCapacity: 123,
    targetSpotCapacity: 123,
  }],
  taskInstanceGroups: [{
    instanceCount: 123,
    instanceType: 'instanceType',

    // the properties below are optional
    autoScalingPolicy: {
      constraints: {
        maxCapacity: 123,
        minCapacity: 123,
      },
      rules: [{
        action: {
          simpleScalingPolicyConfiguration: {
            scalingAdjustment: 123,

            // the properties below are optional
            adjustmentType: 'adjustmentType',
            coolDown: 123,
          },

          // the properties below are optional
          market: 'market',
        },
        name: 'name',
        trigger: {
          cloudWatchAlarmDefinition: {
            comparisonOperator: 'comparisonOperator',
            metricName: 'metricName',
            period: 123,
            threshold: 123,

            // the properties below are optional
            dimensions: [{
              key: 'key',
              value: 'value',
            }],
            evaluationPeriods: 123,
            namespace: 'namespace',
            statistic: 'statistic',
            unit: 'unit',
          },
        },

        // the properties below are optional
        description: 'description',
      }],
    },
    bidPrice: 'bidPrice',
    configurations: [{
      classification: 'classification',
      configurationProperties: {
        configurationPropertiesKey: 'configurationProperties',
      },
      configurations: [configurationProperty_],
    }],
    customAmiId: 'customAmiId',
    ebsConfiguration: {
      ebsBlockDeviceConfigs: [{
        volumeSpecification: {
          sizeInGb: 123,
          volumeType: 'volumeType',

          // the properties below are optional
          iops: 123,
        },

        // the properties below are optional
        volumesPerInstance: 123,
      }],
      ebsOptimized: false,
    },
    market: 'market',
    name: 'name',
  }],
  terminationProtected: false,
};

Properties

NameTypeDescription
additionalMasterSecurityGroups?string[]A list of additional Amazon EC2 security group IDs for the master node.
additionalSlaveSecurityGroups?string[]A list of additional Amazon EC2 security group IDs for the core and task nodes.
coreInstanceFleet?IResolvable | InstanceFleetConfigPropertyDescribes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.
coreInstanceGroup?IResolvable | InstanceGroupConfigPropertyDescribes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.
ec2KeyName?stringThe name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".
ec2SubnetId?stringApplies to clusters that use the uniform instance group configuration.
ec2SubnetIds?string[]Applies to clusters that use the instance fleet configuration.
emrManagedMasterSecurityGroup?stringThe identifier of the Amazon EC2 security group for the master node.
emrManagedSlaveSecurityGroup?stringThe identifier of the Amazon EC2 security group for the core and task nodes.
hadoopVersion?stringApplies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
keepJobFlowAliveWhenNoSteps?boolean | IResolvableSpecifies whether the cluster should remain available after completing all steps.
masterInstanceFleet?IResolvable | InstanceFleetConfigPropertyDescribes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.
masterInstanceGroup?IResolvable | InstanceGroupConfigPropertyDescribes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.
placement?IResolvable | PlacementTypePropertyThe Availability Zone in which the cluster runs.
serviceAccessSecurityGroup?stringThe identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
taskInstanceFleets?IResolvable | IResolvable | InstanceFleetConfigProperty[]Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration.
taskInstanceGroups?IResolvable | IResolvable | InstanceGroupConfigProperty[]Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration.
terminationProtected?boolean | IResolvableSpecifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.

additionalMasterSecurityGroups?

Type: string[] (optional)

A list of additional Amazon EC2 security group IDs for the master node.


additionalSlaveSecurityGroups?

Type: string[] (optional)

A list of additional Amazon EC2 security group IDs for the core and task nodes.


coreInstanceFleet?

Type: IResolvable | InstanceFleetConfigProperty (optional)

Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.


coreInstanceGroup?

Type: IResolvable | InstanceGroupConfigProperty (optional)

Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.


ec2KeyName?

Type: string (optional)

The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".


ec2SubnetId?

Type: string (optional)

Applies to clusters that use the uniform instance group configuration.

To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.


ec2SubnetIds?

Type: string[] (optional)

Applies to clusters that use the instance fleet configuration.

When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.


emrManagedMasterSecurityGroup?

Type: string (optional)

The identifier of the Amazon EC2 security group for the master node.

If you specify EmrManagedMasterSecurityGroup , you must also specify EmrManagedSlaveSecurityGroup .


emrManagedSlaveSecurityGroup?

Type: string (optional)

The identifier of the Amazon EC2 security group for the core and task nodes.

If you specify EmrManagedSlaveSecurityGroup , you must also specify EmrManagedMasterSecurityGroup .


hadoopVersion?

Type: string (optional)

Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.


keepJobFlowAliveWhenNoSteps?

Type: boolean | IResolvable (optional)

Specifies whether the cluster should remain available after completing all steps.

Defaults to true . For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .


masterInstanceFleet?

Type: IResolvable | InstanceFleetConfigProperty (optional)

Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.


masterInstanceGroup?

Type: IResolvable | InstanceGroupConfigProperty (optional)

Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.


placement?

Type: IResolvable | PlacementTypeProperty (optional)

The Availability Zone in which the cluster runs.


serviceAccessSecurityGroup?

Type: string (optional)

The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.


taskInstanceFleets?

Type: IResolvable | IResolvable | InstanceFleetConfigProperty[] (optional)

Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration.

These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets.

You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of InstanceFleetConfig , which are TargetOnDemandCapacity and TargetSpotCapacity . Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, include TaskInstanceFleets when you create your cluster. If you create your cluster without TaskInstanceFleets , Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types.


taskInstanceGroups?

Type: IResolvable | IResolvable | InstanceGroupConfigProperty[] (optional)

Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration.

These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups.

After creating the cluster, you can only modify the mutable properties of InstanceGroupConfig , which are AutoScalingPolicy and InstanceCount . Modifying any other property results in cluster replacement.


terminationProtected?

Type: boolean | IResolvable (optional)

Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.