# EmrCreateClusterJsonataProps

Properties for calling an AWS service's API action using JSONata from your state machine across regions.

Extends: EmrCreateClusterJsonataProps
Extends: TaskStateJsonataBaseProps

- Source: [`aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts#L202)
- Type last changed: v2.216.0 · 22 Sep 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const assign: any;
declare const configurationProperty_: stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty;
declare const outputs: any;
declare const role: iam.Role;
declare const size: cdk.Size;
declare const taskRole: stepfunctions.TaskRole;
declare const timeout: stepfunctions.Timeout;
const emrCreateClusterJsonataProps: stepfunctions_tasks.EmrCreateClusterJsonataProps = {
  instances: {
    additionalMasterSecurityGroups: ['additionalMasterSecurityGroups'],
    additionalSlaveSecurityGroups: ['additionalSlaveSecurityGroups'],
    ec2KeyName: 'ec2KeyName',
    ec2SubnetId: 'ec2SubnetId',
    ec2SubnetIds: ['ec2SubnetIds'],
    emrManagedMasterSecurityGroup: 'emrManagedMasterSecurityGroup',
    emrManagedSlaveSecurityGroup: 'emrManagedSlaveSecurityGroup',
    hadoopVersion: 'hadoopVersion',
    instanceCount: 123,
    instanceFleets: [{
      instanceFleetType: stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,

      // the properties below are optional
      instanceTypeConfigs: [{
        instanceType: 'instanceType',

        // the properties below are optional
        bidPrice: 'bidPrice',
        bidPriceAsPercentageOfOnDemandPrice: 123,
        configurations: [{
          classification: 'classification',
          configurations: [configurationProperty_],
          properties: {
            propertiesKey: 'properties',
          },
        }],
        ebsConfiguration: {
          ebsBlockDeviceConfigs: [{
            volumeSpecification: {
              volumeSize: size,
              volumeType: stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

              // the properties below are optional
              iops: 123,
            },

            // the properties below are optional
            volumesPerInstance: 123,
          }],
          ebsOptimized: false,
        },
        priority: 123,
        weightedCapacity: 123,
      }],
      launchSpecifications: {
        onDemandSpecification: {
          allocationStrategy: stepfunctions_tasks.EmrCreateCluster.OnDemandAllocationStrategy.LOWEST_PRICE,
        },
        spotSpecification: {
          timeoutAction: stepfunctions_tasks.EmrCreateCluster.SpotTimeoutAction.SWITCH_TO_ON_DEMAND,

          // the properties below are optional
          allocationStrategy: stepfunctions_tasks.EmrCreateCluster.SpotAllocationStrategy.CAPACITY_OPTIMIZED,
          blockDurationMinutes: 123,
          timeout: cdk.Duration.minutes(30),
          timeoutDurationMinutes: 123,
        },
      },
      name: 'name',
      targetOnDemandCapacity: 123,
      targetSpotCapacity: 123,
    }],
    instanceGroups: [{
      instanceCount: 123,
      instanceRole: stepfunctions_tasks.EmrCreateCluster.InstanceRoleType.MASTER,
      instanceType: 'instanceType',

      // the properties below are optional
      autoScalingPolicy: {
        constraints: {
          maxCapacity: 123,
          minCapacity: 123,
        },
        rules: [{
          action: {
            simpleScalingPolicyConfiguration: {
              scalingAdjustment: 123,

              // the properties below are optional
              adjustmentType: stepfunctions_tasks.EmrCreateCluster.ScalingAdjustmentType.CHANGE_IN_CAPACITY,
              coolDown: 123,
            },

            // the properties below are optional
            market: stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
          },
          name: 'name',
          trigger: {
            cloudWatchAlarmDefinition: {
              comparisonOperator: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmComparisonOperator.GREATER_THAN_OR_EQUAL,
              metricName: 'metricName',
              period: cdk.Duration.minutes(30),

              // the properties below are optional
              dimensions: [{
                key: 'key',
                value: 'value',
              }],
              evaluationPeriods: 123,
              namespace: 'namespace',
              statistic: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmStatistic.SAMPLE_COUNT,
              threshold: 123,
              unit: stepfunctions_tasks.EmrCreateCluster.CloudWatchAlarmUnit.NONE,
            },
          },

          // the properties below are optional
          description: 'description',
        }],
      },
      bidPrice: 'bidPrice',
      configurations: [{
        classification: 'classification',
        configurations: [configurationProperty_],
        properties: {
          propertiesKey: 'properties',
        },
      }],
      ebsConfiguration: {
        ebsBlockDeviceConfigs: [{
          volumeSpecification: {
            volumeSize: size,
            volumeType: stepfunctions_tasks.EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,

            // the properties below are optional
            iops: 123,
          },

          // the properties below are optional
          volumesPerInstance: 123,
        }],
        ebsOptimized: false,
      },
      market: stepfunctions_tasks.EmrCreateCluster.InstanceMarket.ON_DEMAND,
      name: 'name',
    }],
    masterInstanceType: 'masterInstanceType',
    placement: {
      availabilityZone: 'availabilityZone',
      availabilityZones: ['availabilityZones'],
    },
    serviceAccessSecurityGroup: 'serviceAccessSecurityGroup',
    slaveInstanceType: 'slaveInstanceType',
    terminationProtected: false,
  },
  name: 'name',

  // the properties below are optional
  additionalInfo: 'additionalInfo',
  applications: [{
    name: 'name',

    // the properties below are optional
    additionalInfo: {
      additionalInfoKey: 'additionalInfo',
    },
    args: ['args'],
    version: 'version',
  }],
  assign: {
    assignKey: assign,
  },
  autoScalingRole: role,
  autoTerminationPolicyIdleTimeout: cdk.Duration.minutes(30),
  bootstrapActions: [{
    name: 'name',
    scriptBootstrapAction: {
      path: 'path',

      // the properties below are optional
      args: ['args'],
    },
  }],
  clusterRole: role,
  comment: 'comment',
  configurations: [{
    classification: 'classification',
    configurations: [configurationProperty_],
    properties: {
      propertiesKey: 'properties',
    },
  }],
  credentials: {
    role: taskRole,
  },
  customAmiId: 'customAmiId',
  ebsRootVolumeIops: 123,
  ebsRootVolumeSize: size,
  ebsRootVolumeThroughput: 123,
  heartbeat: cdk.Duration.minutes(30),
  heartbeatTimeout: timeout,
  integrationPattern: stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
  kerberosAttributes: {
    realm: 'realm',

    // the properties below are optional
    adDomainJoinPassword: 'adDomainJoinPassword',
    adDomainJoinUser: 'adDomainJoinUser',
    crossRealmTrustPrincipalPassword: 'crossRealmTrustPrincipalPassword',
    kdcAdminPassword: 'kdcAdminPassword',
  },
  logUri: 'logUri',
  managedScalingPolicy: {
    computeLimits: {
      maximumCapacityUnits: 123,
      minimumCapacityUnits: 123,
      unitType: stepfunctions_tasks.EmrCreateCluster.ComputeLimitsUnitType.INSTANCE_FLEET_UNITS,

      // the properties below are optional
      maximumCoreCapacityUnits: 123,
      maximumOnDemandCapacityUnits: 123,
    },
  },
  outputs: outputs,
  queryLanguage: stepfunctions.QueryLanguage.JSON_PATH,
  releaseLabel: 'releaseLabel',
  scaleDownBehavior: stepfunctions_tasks.EmrCreateCluster.EmrClusterScaleDownBehavior.TERMINATE_AT_INSTANCE_HOUR,
  securityConfiguration: 'securityConfiguration',
  serviceRole: role,
  stateName: 'stateName',
  stepConcurrencyLevel: 123,
  tags: {
    tagsKey: 'tags',
  },
  taskTimeout: timeout,
  timeout: cdk.Duration.minutes(30),
  visibleToAllUsers: false,
};
```

## Properties

- `additionalInfo`: string = None — A JSON string for selecting additional features.

- `applications`: [EmrCreateCluster.ApplicationConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.ApplicationConfigProperty.html)[] — A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.

  **Default:** EMR selected default

- `assign`: { [key: string]: any } — Workflow variables to store in this step.

  **Default:** Not assign variables

  Using workflow variables, you can store data in a step and retrieve that data in future steps.

- `autoScalingRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — An IAM role for automatic scaling policies.

  **Default:** A role will be created.

- `autoTerminationPolicyIdleTimeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The amount of idle time after which the cluster automatically terminates.

  **Default:** No timeout

  You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

- `bootstrapActions`: [EmrCreateCluster.BootstrapActionConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.BootstrapActionConfigProperty.html)[] = None — A list of bootstrap actions to run before Hadoop starts on the cluster nodes.

- `clusterRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — Also called instance profile and EC2 role.

  **Default:** * A Role will be created

  An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role.

  This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters.

- `comment`: string — A comment describing this state.

  **Default:** No comment

- `configurations`: [EmrCreateCluster.ConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.ConfigurationProperty.html)[] = None — The list of configurations supplied for the EMR cluster you are creating.

- `credentials`: [Credentials](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Credentials.html) — Credentials for an IAM Role that the State Machine assumes for executing the task.

  **Default:** None (Task is executed using the State Machine's execution role)

  This enables cross-account resource invocations.

- `customAmiId`: string = None — The ID of a custom Amazon EBS-backed Linux AMI.

- `ebsRootVolumeIops`: number — The IOPS of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

  **Default:** EMR selected default

  Requires EMR release label 6.15.0 or above.
  Must be in range [3000, 16000].

- `ebsRootVolumeSize`: [Size](/cdk/api/v2/docs/aws-cdk-lib.Size.html) — The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

  **Default:** EMR selected default

- `ebsRootVolumeThroughput`: number — The throughput, in MiB/s, of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

  **Default:** EMR selected default

  Requires EMR release label 6.15.0 or above.
  Must be in range [125, 1000].

- `heartbeat`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `heartbeatTimeout`

- `heartbeatTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the heartbeat.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `instances`: [EmrCreateCluster.InstancesConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.InstancesConfigProperty.html) (required) — A specification of the number and type of Amazon EC2 instances.

- `integrationPattern`: [IntegrationPattern](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.IntegrationPattern.html) — AWS Step Functions integrates with services directly in the Amazon States Language.

  **Default:** `IntegrationPattern.REQUEST_RESPONSE` for most tasks. `IntegrationPattern.RUN_JOB` for the following exceptions: `BatchSubmitJob`, `EmrAddStep`, `EmrCreateCluster`, `EmrTerminationCluster`, and `EmrContainersStartJobRun`.

  You can control these AWS services using service integration patterns.

  Depending on the AWS Service, the Service Integration Pattern availability will vary.

- `kerberosAttributes`: [EmrCreateCluster.KerberosAttributesProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.KerberosAttributesProperty.html) = None — Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.

- `logUri`: string = None — The location in Amazon S3 to write the log files of the job flow.

- `managedScalingPolicy`: [EmrCreateCluster.ManagedScalingPolicyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.ManagedScalingPolicyProperty.html) = None — The specified managed scaling policy for an Amazon EMR cluster.

- `name`: string (required) — The Name of the Cluster.

- `outputs`: any — Used to specify and transform output from the state.

  **Default:** $states.result or $states.errorOutput

  When specified, the value overrides the state output default.
  The output field accepts any JSON value (object, array, string, number, boolean, null).
  Any string value, including those inside objects or arrays,
  will be evaluated as JSONata if surrounded by {% %} characters.
  Output also accepts a JSONata expression directly.

- `queryLanguage`: [QueryLanguage](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.QueryLanguage.html) = JSONPath — The name of the query language used by the state.

  If the state does not contain a `queryLanguage` field,
  then it will use the query language specified in the top-level `queryLanguage` field.

- `releaseLabel`: string — The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.

  **Default:** EMR selected default

- `scaleDownBehavior`: [EmrCreateCluster.EmrClusterScaleDownBehavior](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions_tasks.EmrCreateCluster.EmrClusterScaleDownBehavior.html) — Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

  **Default:** EMR selected default

- `securityConfiguration`: string = None — The name of a security configuration to apply to the cluster.

- `serviceRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

  **Default:** A role will be created that Amazon EMR service can assume.

- `stateName`: string — Optional name for this state.

  **Default:** The construct ID will be used as state name

- `stepConcurrencyLevel`: number — Specifies the step concurrency level to allow multiple steps to run in parallel.

  **Default:** 1 - no step concurrency allowed

  Requires EMR release label 5.28.0 or above.
  Must be in range [1, 256].

- `tags`: { [key: string]: string } = None — A list of tags to associate with a cluster and propagate to Amazon EC2 instances.

- `taskTimeout`: [Timeout](/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.Timeout.html) = None — Timeout for the task.

  [disable-awslint:duration-prop-type] is needed because all props interface in
  aws-stepfunctions-tasks extend this interface

- `timeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = None — use `taskTimeout`

- `visibleToAllUsers`: boolean = true — A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions.
