AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EMR::InstanceGroupConfig

CfnInstanceGroupConfig

Use `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

import { CfnInstanceGroupConfig } from 'aws-cdk-lib/aws-emr';

Or use the module namespace:

import * as emr from 'aws-cdk-lib/aws-emr';
// emr.CfnInstanceGroupConfig

Properties

Configuration passed to the constructor as CfnInstanceGroupConfigProps.

instanceCountRequired
number

Target number of instances for the instance group.

instanceRoleRequired
string

The role of the instance group in the cluster. *Allowed Values* : TASK

instanceTypeRequired
string

The Amazon EC2 instance type for all instances in the instance group.

jobFlowIdRequired
string

The ID of an Amazon EMR cluster that you want to associate this instance group with.

autoScalingPolicyOptional
IResolvable | 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* .

bidPriceOptional
string

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

configurationsOptional
IResolvable | 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).

customAmiIdOptional
string

The custom AMI ID to use for the provisioned instance group.

ebsConfigurationOptional
IResolvable | EbsConfigurationProperty

`EbsConfiguration` determines the EBS volumes to attach to EMR cluster instances.

marketOptional
string

Market type of the Amazon EC2 instances used to create a cluster node.

nameOptional
string

Friendly name given to the instance group.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter