interface CfnClusterProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EMR.CfnClusterProps |
Java | software.amazon.awscdk.services.emr.CfnClusterProps |
Python | aws_cdk.aws_emr.CfnClusterProps |
TypeScript | @aws-cdk/aws-emr » CfnClusterProps |
Properties for defining a CfnCluster
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as emr from '@aws-cdk/aws-emr';
declare const additionalInfo: any;
declare const configurationProperty_: emr.CfnCluster.ConfigurationProperty;
const cfnClusterProps: emr.CfnClusterProps = {
instances: {
additionalMasterSecurityGroups: ['additionalMasterSecurityGroups'],
additionalSlaveSecurityGroups: ['additionalSlaveSecurityGroups'],
coreInstanceFleet: {
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
},
coreInstanceGroup: {
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
},
ec2KeyName: 'ec2KeyName',
ec2SubnetId: 'ec2SubnetId',
ec2SubnetIds: ['ec2SubnetIds'],
emrManagedMasterSecurityGroup: 'emrManagedMasterSecurityGroup',
emrManagedSlaveSecurityGroup: 'emrManagedSlaveSecurityGroup',
hadoopVersion: 'hadoopVersion',
keepJobFlowAliveWhenNoSteps: false,
masterInstanceFleet: {
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
},
masterInstanceGroup: {
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
},
placement: {
availabilityZone: 'availabilityZone',
},
serviceAccessSecurityGroup: 'serviceAccessSecurityGroup',
taskInstanceFleets: [{
instanceTypeConfigs: [{
instanceType: 'instanceType',
// the properties below are optional
bidPrice: 'bidPrice',
bidPriceAsPercentageOfOnDemandPrice: 123,
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
weightedCapacity: 123,
}],
launchSpecifications: {
onDemandSpecification: {
allocationStrategy: 'allocationStrategy',
},
spotSpecification: {
timeoutAction: 'timeoutAction',
timeoutDurationMinutes: 123,
// the properties below are optional
allocationStrategy: 'allocationStrategy',
blockDurationMinutes: 123,
},
},
name: 'name',
targetOnDemandCapacity: 123,
targetSpotCapacity: 123,
}],
taskInstanceGroups: [{
instanceCount: 123,
instanceType: 'instanceType',
// the properties below are optional
autoScalingPolicy: {
constraints: {
maxCapacity: 123,
minCapacity: 123,
},
rules: [{
action: {
simpleScalingPolicyConfiguration: {
scalingAdjustment: 123,
// the properties below are optional
adjustmentType: 'adjustmentType',
coolDown: 123,
},
// the properties below are optional
market: 'market',
},
name: 'name',
trigger: {
cloudWatchAlarmDefinition: {
comparisonOperator: 'comparisonOperator',
metricName: 'metricName',
period: 123,
threshold: 123,
// the properties below are optional
dimensions: [{
key: 'key',
value: 'value',
}],
evaluationPeriods: 123,
namespace: 'namespace',
statistic: 'statistic',
unit: 'unit',
},
},
// the properties below are optional
description: 'description',
}],
},
bidPrice: 'bidPrice',
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsConfiguration: {
ebsBlockDeviceConfigs: [{
volumeSpecification: {
sizeInGb: 123,
volumeType: 'volumeType',
// the properties below are optional
iops: 123,
},
// the properties below are optional
volumesPerInstance: 123,
}],
ebsOptimized: false,
},
market: 'market',
name: 'name',
}],
terminationProtected: false,
},
jobFlowRole: 'jobFlowRole',
name: 'name',
serviceRole: 'serviceRole',
// the properties below are optional
additionalInfo: additionalInfo,
applications: [{
additionalInfo: {
additionalInfoKey: 'additionalInfo',
},
args: ['args'],
name: 'name',
version: 'version',
}],
autoScalingRole: 'autoScalingRole',
autoTerminationPolicy: {
idleTimeout: 123,
},
bootstrapActions: [{
name: 'name',
scriptBootstrapAction: {
path: 'path',
// the properties below are optional
args: ['args'],
},
}],
configurations: [{
classification: 'classification',
configurationProperties: {
configurationPropertiesKey: 'configurationProperties',
},
configurations: [configurationProperty_],
}],
customAmiId: 'customAmiId',
ebsRootVolumeSize: 123,
kerberosAttributes: {
kdcAdminPassword: 'kdcAdminPassword',
realm: 'realm',
// the properties below are optional
adDomainJoinPassword: 'adDomainJoinPassword',
adDomainJoinUser: 'adDomainJoinUser',
crossRealmTrustPrincipalPassword: 'crossRealmTrustPrincipalPassword',
},
logEncryptionKmsKeyId: 'logEncryptionKmsKeyId',
logUri: 'logUri',
managedScalingPolicy: {
computeLimits: {
maximumCapacityUnits: 123,
minimumCapacityUnits: 123,
unitType: 'unitType',
// the properties below are optional
maximumCoreCapacityUnits: 123,
maximumOnDemandCapacityUnits: 123,
},
},
osReleaseLabel: 'osReleaseLabel',
releaseLabel: 'releaseLabel',
scaleDownBehavior: 'scaleDownBehavior',
securityConfiguration: 'securityConfiguration',
stepConcurrencyLevel: 123,
steps: [{
hadoopJarStep: {
jar: 'jar',
// the properties below are optional
args: ['args'],
mainClass: 'mainClass',
stepProperties: [{
key: 'key',
value: 'value',
}],
},
name: 'name',
// the properties below are optional
actionOnFailure: 'actionOnFailure',
}],
tags: [{
key: 'key',
value: 'value',
}],
visibleToAllUsers: false,
};
Properties
Name | Type | Description |
---|---|---|
instances | Job | IResolvable | A specification of the number and type of Amazon EC2 instances. |
job | string | Also called instance profile and Amazon EC2 role. |
name | string | The name of the cluster. |
service | string | The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf. |
additional | any | A JSON string for selecting additional features. |
applications? | IResolvable | IResolvable | Application [] | The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. |
auto | string | An IAM role for automatic scaling policies. |
auto | IResolvable | Auto | AWS::EMR::Cluster.AutoTerminationPolicy . |
bootstrap | IResolvable | IResolvable | Bootstrap [] | A list of bootstrap actions to run before Hadoop starts on the cluster nodes. |
configurations? | IResolvable | IResolvable | Configuration [] | Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. |
custom | string | Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI. |
ebs | number | The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. |
kerberos | IResolvable | Kerberos | Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. |
log | string | The AWS KMS key used for encrypting log files. |
log | string | The path to the Amazon S3 location where logs for this cluster are stored. |
managed | IResolvable | Managed | Creates or updates a managed scaling policy for an Amazon EMR cluster. |
os | string | AWS::EMR::Cluster.OSReleaseLabel . |
release | string | The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. |
scale | string | The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. |
security | string | The name of the security configuration applied to the cluster. |
step | number | Specifies the number of steps that can be executed concurrently. |
steps? | IResolvable | IResolvable | Step [] | A list of steps to run. |
tags? | Cfn [] | A list of tags associated with a cluster. |
visible | boolean | IResolvable | Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. |
instances
Type:
Job
|
IResolvable
A specification of the number and type of Amazon EC2 instances.
jobFlowRole
Type:
string
Also called instance profile and Amazon EC2 role.
An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole
. In order to use the default role, you must have already created it using the AWS CLI or console.
name
Type:
string
The name of the cluster.
serviceRole
Type:
string
The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf.
additionalInfo?
Type:
any
(optional)
A JSON string for selecting additional features.
applications?
Type:
IResolvable
|
IResolvable
|
Application
[]
(optional)
The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.
autoScalingRole?
Type:
string
(optional)
An IAM role for automatic scaling policies.
The default role is EMR_AutoScaling_DefaultRole
. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.
autoTerminationPolicy?
Type:
IResolvable
|
Auto
(optional)
AWS::EMR::Cluster.AutoTerminationPolicy
.
bootstrapActions?
Type:
IResolvable
|
IResolvable
|
Bootstrap
[]
(optional)
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
configurations?
Type:
IResolvable
|
IResolvable
|
Configuration
[]
(optional)
Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.
customAmiId?
Type:
string
(optional)
Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
ebsRootVolumeSize?
Type:
number
(optional)
The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance.
Available in Amazon EMR releases 4.x and later.
kerberosAttributes?
Type:
IResolvable
|
Kerberos
(optional)
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
For more information see Use Kerberos Authentication in the Amazon EMR Management Guide .
logEncryptionKmsKeyId?
Type:
string
(optional)
The AWS KMS key used for encrypting log files.
This attribute is only available with Amazon EMR 5.30.0 and later, excluding Amazon EMR 6.0.0.
logUri?
Type:
string
(optional)
The path to the Amazon S3 location where logs for this cluster are stored.
managedScalingPolicy?
Type:
IResolvable
|
Managed
(optional)
Creates or updates a managed scaling policy for an Amazon EMR cluster.
The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.
osReleaseLabel?
Type:
string
(optional)
AWS::EMR::Cluster.OSReleaseLabel
.
releaseLabel?
Type:
string
(optional)
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.
Release labels are in the form emr-x.x.x
, where x.x.x is an Amazon EMR release version such as emr-5.14.0
. For more information about Amazon EMR release versions and included application versions and features, see . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion
.
scaleDownBehavior?
Type:
string
(optional)
The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION
is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
securityConfiguration?
Type:
string
(optional)
The name of the security configuration applied to the cluster.
stepConcurrencyLevel?
Type:
number
(optional)
Specifies the number of steps that can be executed concurrently.
The default value is 1
. The maximum value is 256
.
steps?
Type:
IResolvable
|
IResolvable
|
Step
[]
(optional)
A list of steps to run.
tags?
Type:
Cfn
[]
(optional)
A list of tags associated with a cluster.
visibleToAllUsers?
Type:
boolean |
IResolvable
(optional)
Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.
If this value is set to true
, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false
, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.
When you create clusters directly through the EMR console or API, this value is set to
true
by default. However, forAWS::EMR::Cluster
resources in CloudFormation, the default isfalse
.