AWS::EMR::InstanceGroupConfigUse `InstanceGroupConfig` to define instance groups for an EMR cluster. A cluster can not use both instance groups and instance fleets. For more information, see [Create a Cluster with Instance Fleets or Uniform Instance Groups](https://docs.aws.amazon.com//emr/latest/ManagementGuide/emr-instance-group-configuration.html) in the *Amazon EMR Management Guide* . > You can currently only add task instance groups to a cluster with this resource. If you use this resource, CloudFormation waits for the cluster launch to complete before adding the task instance group to the cluster. In order to add task instance groups to the cluster as part of the cluster launch and minimize delays in provisioning task nodes, use the `TaskInstanceGroups` subproperty for the [AWS::EMR::Cluster JobFlowInstancesConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-jobflowinstancesconfig.html) property instead. To use this subproperty, see [AWS::EMR::Cluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticmapreduce-cluster.html) for examples.
import { CfnInstanceGroupConfig } from 'aws-cdk-lib/aws-emr';Or use the module namespace:
import * as emr from 'aws-cdk-lib/aws-emr';
// emr.CfnInstanceGroupConfigConfiguration passed to the constructor as CfnInstanceGroupConfigProps.
instanceCountRequirednumberTarget number of instances for the instance group.
instanceRoleRequiredstringThe role of the instance group in the cluster. *Allowed Values* : TASK
instanceTypeRequiredstringThe Amazon EC2 instance type for all instances in the instance group.
jobFlowIdRequiredstringThe ID of an Amazon EMR cluster that you want to associate this instance group with.
autoScalingPolicyOptionalIResolvable | AutoScalingPolicyProperty`AutoScalingPolicy` is a subproperty of `InstanceGroupConfig` . `AutoScalingPolicy` defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see [Using Automatic Scaling in Amazon EMR](https://docs.aws.amazon.com//emr/latest/ManagementGuide/emr-automatic-scaling.html) in the *Amazon EMR Management Guide* .
bidPriceOptionalstringIf specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify `OnDemandPrice` to set the amount equal to the On-Demand price, or specify an amount in USD.
configurationsOptionalIResolvable | IResolvable | ConfigurationProperty[]> Amazon EMR releases 4.x or later. The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).
customAmiIdOptionalstringThe custom AMI ID to use for the provisioned instance group.
ebsConfigurationOptionalIResolvable | EbsConfigurationProperty`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.
marketOptionalstringMarket type of the Amazon EC2 instances used to create a cluster node.
nameOptionalstringFriendly name given to the instance group.
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-emrAWS::EMR::InstanceGroupConfig