Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::EMR::InstanceGroupConfig

The AWS::EMR::InstanceGroupConfig resource configures a task instance group for an Amazon EMR (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

Copy
{ "Type" : "AWS::EMR::InstanceGroupConfig", "Properties" : { "BidPrice" : String, "Configurations" : [ Configuration, ... ], "EbsConfiguration" : EBSConfiguration, "InstanceCount" : Integer, "InstanceRole" : String, "InstanceType" : String, "JobFlowId": String, "Market" : String, "Name" : String } }

YAML

Copy
Type: "AWS::EMR::InstanceGroupConfig" Properties: BidPrice: String Configurations: - Configuration EbsConfiguration" : EBSConfiguration InstanceCount" : Integer InstanceRole" : String InstanceType" : String JobFlowId": String Market" : String Name" : String

Properties

BidPrice

The bid price in USD for each 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 Configuration

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_DEMAND or SPOT. 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

Copy
"TestInstanceGroupConfig": { "Type": "AWS::EMR::InstanceGroupConfig", "Properties": { "InstanceCount": 2, "InstanceType": "m3.xlarge", "InstanceRole": "TASK", "Market": "ON_DEMAND", "Name": "cfnTask2", "JobFlowId": { "Ref": "cluster" } } }

YAML

Copy
TestInstanceGroupConfig: Type: "AWS::EMR::InstanceGroupConfig" Properties: InstanceCount: 2 InstanceType: "m3.xlarge" InstanceRole: "TASK" Market: "ON_DEMAND" Name: "cfnTask2" JobFlowId: Ref: "cluster"