AWS::EMR::InstanceGroupConfig
The AWS::EMR::InstanceGroupConfig resource configures a task instance group for
an Amazon EMR cluster.
Note
You can't delete an instance group. If you remove an instance group, AWS CloudFormation
sets the
instance count to zero (0).
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EMR::InstanceGroupConfig", "Properties" : { "AutoScalingPolicy" :AutoScalingPolicy, "BidPrice" :String, "Configurations" : [Configuration, ...], "EbsConfiguration" :EBSConfiguration, "InstanceCount" :Integer, "InstanceRole" :String, "InstanceType" :String, "JobFlowId":String, "Market" :String, "Name" :String} }
YAML
Type: AWS::EMR::InstanceGroupConfig Properties: AutoScalingPolicy:AutoScalingPolicyBidPrice:StringConfigurations: -ConfigurationEbsConfiguration" :EBSConfigurationInstanceCount" :IntegerInstanceRole" :StringInstanceType" :StringJobFlowId":StringMarket" :StringName" :String
Properties
Note
For more information about the constraints and valid values of each property, see the InstanceGroupConfig in the Amazon EMR API Reference.
AutoScalingPolicy-
An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. An automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see PutAutoScalingPolicy in the Amazon EMR API Reference.
Required: No
Type: Amazon EMR InstanceGroupConfig AutoScalingPolicy
Update requires: No interruption
BidPrice-
The bid price in USD for each Amazon EC2 instance in the instance group when launching instances (nodes) as Spot Instances.
Required: No
Type: String
Update requires: Replacement
Configurations-
A list of configurations to apply to this instance group. For more information see, Configuring Applications in the Amazon EMR Release Guide.
Required: No
Type: List of Amazon EMR Cluster Configurations
Update requires: Replacement
EbsConfiguration-
Configures Amazon Elastic Block Store (Amazon EBS) storage volumes to attach to your instances.
Required: No
Type: Amazon EMR EbsConfiguration
Update requires: Replacement
InstanceCount-
The number of instances to launch in the instance group.
Required: Yes
Type: Integer
Update requires: No interruption
InstanceRole-
The role of the servers in the Amazon EMR cluster, such as
TASK. For more information, see Instance Groups in the Amazon EMR Management Guide.Note
Currently, the only valid value is
TASK. You configure the master and core instance groups as part of the AWS::EMR::Cluster resource.Required: Yes
Type: String
Update requires: Replacement
InstanceType-
The EC2 instance type for all instances in the instance group. For more information, see Instance Configurations in the Amazon EMR Management Guide.
Required: Yes
Type: String
Update requires: Replacement
JobFlowId-
The ID of an Amazon EMR cluster that you want to associate this instance group with.
Required: Yes
Type: String
Update requires: Replacement
Market-
The type of marketplace from which your instances are provisioned into this group, either
ON_DEMANDorSPOT. For more information, see Amazon EC2 Purchasing Options.Required: No
Type: String
Update requires: Replacement
Name-
A name for the instance group.
Required: No
Type: String
Update requires: Replacement
Return Values
Ref
When the logical ID of this resource is provided to the Ref
intrinsic function, Ref returns the instance group ID, such as
ig-ABC12DEF3456.
For more information about using the Ref function, see Ref.
Example
The following example adds a task instance group to the TestCluster cluster.
The instance group contains two m3.xlarge instances.
JSON
"TestInstanceGroupConfig": { "Type": "AWS::EMR::InstanceGroupConfig", "Properties": { "InstanceCount": 2, "InstanceType": "m3.xlarge", "InstanceRole": "TASK", "Market": "ON_DEMAND", "Name": "cfnTask2", "JobFlowId": { "Ref": "cluster" } } }
YAML
TestInstanceGroupConfig: Type: AWS::EMR::InstanceGroupConfig Properties: InstanceCount: 2 InstanceType: "m3.xlarge" InstanceRole: "TASK" Market: "ON_DEMAND" Name: "cfnTask2" JobFlowId: Ref: "cluster"
