interface InstancesConfigProperty
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.StepFunctions.Tasks.EmrCreateCluster.InstancesConfigProperty |
Java | software.amazon.awscdk.services.stepfunctions.tasks.EmrCreateCluster.InstancesConfigProperty |
Python | aws_cdk.aws_stepfunctions_tasks.EmrCreateCluster.InstancesConfigProperty |
TypeScript (source) | @aws-cdk/aws-stepfunctions-tasks » EmrCreateCluster » InstancesConfigProperty |
A specification of the number and type of Amazon EC2 instances.
See the RunJobFlow API for complete documentation on input parameters
Example
const clusterRole = new iam.Role(this, 'ClusterRole', {
assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'),
});
const serviceRole = new iam.Role(this, 'ServiceRole', {
assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
});
const autoScalingRole = new iam.Role(this, 'AutoScalingRole', {
assumedBy: new iam.ServicePrincipal('elasticmapreduce.amazonaws.com'),
});
autoScalingRole.assumeRolePolicy?.addStatements(
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
principals: [
new iam.ServicePrincipal('application-autoscaling.amazonaws.com'),
],
actions: [
'sts:AssumeRole',
],
}));
)
new tasks.EmrCreateCluster(this, 'Create Cluster', {
instances: {},
clusterRole,
name: sfn.TaskInput.fromJsonPathAt('$.ClusterName').value,
serviceRole,
autoScalingRole,
});
Properties
Name | Type | Description |
---|---|---|
additional | string[] | A list of additional Amazon EC2 security group IDs for the master node. |
additional | string[] | A list of additional Amazon EC2 security group IDs for the core and task nodes. |
ec2 | string | The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.". |
ec2 | string | Applies to clusters that use the uniform instance group configuration. |
ec2 | string[] | Applies to clusters that use the instance fleet configuration. |
emr | string | The identifier of the Amazon EC2 security group for the master node. |
emr | string | The identifier of the Amazon EC2 security group for the core and task nodes. |
hadoop | string | Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. |
instance | number | The number of EC2 instances in the cluster. |
instance | Instance [] | Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. |
instance | Instance [] | Configuration for the instance groups in a cluster. |
master | string | The EC2 instance type of the master node. |
placement? | Placement | The Availability Zone in which the cluster runs. |
service | string | The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets. |
slave | string | The EC2 instance type of the core and task nodes. |
termination | boolean | 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. |
additionalMasterSecurityGroups?
Type:
string[]
(optional, default: None)
A list of additional Amazon EC2 security group IDs for the master node.
additionalSlaveSecurityGroups?
Type:
string[]
(optional, default: None)
A list of additional Amazon EC2 security group IDs for the core and task nodes.
ec2KeyName?
Type:
string
(optional, default: None)
The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.".
ec2SubnetId?
Type:
string
(optional, default: EMR selected default)
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.
ec2SubnetIds?
Type:
string[]
(optional, default: EMR selected default)
Applies to clusters that use the instance fleet configuration.
When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.
emrManagedMasterSecurityGroup?
Type:
string
(optional, default: None)
The identifier of the Amazon EC2 security group for the master node.
emrManagedSlaveSecurityGroup?
Type:
string
(optional, default: None)
The identifier of the Amazon EC2 security group for the core and task nodes.
hadoopVersion?
Type:
string
(optional, default: 0.18 if the AmiVersion parameter is not set. If AmiVersion is set, the version of Hadoop for that AMI version is used.)
Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster.
instanceCount?
Type:
number
(optional, default: 0)
The number of EC2 instances in the cluster.
instanceFleets?
Type:
Instance
[]
(optional, default: None)
Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
instanceGroups?
Type:
Instance
[]
(optional, default: None)
Configuration for the instance groups in a cluster.
masterInstanceType?
Type:
string
(optional, default: None)
The EC2 instance type of the master node.
placement?
Type:
Placement
(optional, default: EMR selected default)
The Availability Zone in which the cluster runs.
serviceAccessSecurityGroup?
Type:
string
(optional, default: None)
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
slaveInstanceType?
Type:
string
(optional, default: None)
The EC2 instance type of the core and task nodes.
terminationProtected?
Type:
boolean
(optional, default: false)
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.