AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

Cluster

Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See Amazon Elastic MapReduce Documentation for more information.

To configure Instance Groups for task nodes, see the aws.emr.InstanceGroup resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var cluster = new Aws.Emr.Cluster("cluster", new Aws.Emr.ClusterArgs
        {
            ReleaseLabel = "emr-4.6.0",
            Applications = 
            {
                "Spark",
            },
            AdditionalInfo = @"{
  ""instanceAwsClientConfiguration"": {
    ""proxyPort"": 8099,
    ""proxyHost"": ""myproxy.example.com""
  }
}
",
            TerminationProtection = false,
            KeepJobFlowAliveWhenNoSteps = true,
            Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs
            {
                SubnetId = aws_subnet.Main.Id,
                EmrManagedMasterSecurityGroup = aws_security_group.Sg.Id,
                EmrManagedSlaveSecurityGroup = aws_security_group.Sg.Id,
                InstanceProfile = aws_iam_instance_profile.Emr_profile.Arn,
            },
            MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs
            {
                InstanceType = "m4.large",
            },
            CoreInstanceGroup = new Aws.Emr.Inputs.ClusterCoreInstanceGroupArgs
            {
                InstanceType = "c4.large",
                InstanceCount = 1,
                EbsConfigs = 
                {
                    new Aws.Emr.Inputs.ClusterCoreInstanceGroupEbsConfigArgs
                    {
                        Size = 40,
                        Type = "gp2",
                        VolumesPerInstance = 1,
                    },
                },
                BidPrice = "0.30",
                AutoscalingPolicy = @"{
""Constraints"": {
  ""MinCapacity"": 1,
  ""MaxCapacity"": 2
},
""Rules"": [
  {
    ""Name"": ""ScaleOutMemoryPercentage"",
    ""Description"": ""Scale out if YARNMemoryAvailablePercentage is less than 15"",
    ""Action"": {
      ""SimpleScalingPolicyConfiguration"": {
        ""AdjustmentType"": ""CHANGE_IN_CAPACITY"",
        ""ScalingAdjustment"": 1,
        ""CoolDown"": 300
      }
    },
    ""Trigger"": {
      ""CloudWatchAlarmDefinition"": {
        ""ComparisonOperator"": ""LESS_THAN"",
        ""EvaluationPeriods"": 1,
        ""MetricName"": ""YARNMemoryAvailablePercentage"",
        ""Namespace"": ""AWS/ElasticMapReduce"",
        ""Period"": 300,
        ""Statistic"": ""AVERAGE"",
        ""Threshold"": 15.0,
        ""Unit"": ""PERCENT""
      }
    }
  }
]
}
",
            },
            EbsRootVolumeSize = 100,
            Tags = 
            {
                { "role", "rolename" },
                { "env", "env" },
            },
            BootstrapActions = 
            {
                new Aws.Emr.Inputs.ClusterBootstrapActionArgs
                {
                    Path = "s3://elasticmapreduce/bootstrap-actions/run-if",
                    Name = "runif",
                    Args = 
                    {
                        "instance.isMaster=true",
                        "echo running on master node",
                    },
                },
            },
            ConfigurationsJson = @"  [
    {
      ""Classification"": ""hadoop-env"",
      ""Configurations"": [
        {
          ""Classification"": ""export"",
          ""Properties"": {
            ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
          }
        }
      ],
      ""Properties"": {}
    },
    {
      ""Classification"": ""spark-env"",
      ""Configurations"": [
        {
          ""Classification"": ""export"",
          ""Properties"": {
            ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
          }
        }
      ],
      ""Properties"": {}
    }
  ]
",
            ServiceRole = aws_iam_role.Iam_emr_service_role.Arn,
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
			ReleaseLabel: pulumi.String("emr-4.6.0"),
			Applications: pulumi.StringArray{
				pulumi.String("Spark"),
			},
			AdditionalInfo:              pulumi.String(fmt.Sprintf("%v%v%v%v%v%v", "{\n", "  \"instanceAwsClientConfiguration\": {\n", "    \"proxyPort\": 8099,\n", "    \"proxyHost\": \"myproxy.example.com\"\n", "  }\n", "}\n")),
			TerminationProtection:       pulumi.Bool(false),
			KeepJobFlowAliveWhenNoSteps: pulumi.Bool(true),
			Ec2Attributes: &emr.ClusterEc2AttributesArgs{
				SubnetId:                      pulumi.Any(aws_subnet.Main.Id),
				EmrManagedMasterSecurityGroup: pulumi.Any(aws_security_group.Sg.Id),
				EmrManagedSlaveSecurityGroup:  pulumi.Any(aws_security_group.Sg.Id),
				InstanceProfile:               pulumi.Any(aws_iam_instance_profile.Emr_profile.Arn),
			},
			MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
				InstanceType: pulumi.String("m4.large"),
			},
			CoreInstanceGroup: &emr.ClusterCoreInstanceGroupArgs{
				InstanceType:  pulumi.String("c4.large"),
				InstanceCount: pulumi.Int(1),
				EbsConfigs: emr.ClusterCoreInstanceGroupEbsConfigArray{
					&emr.ClusterCoreInstanceGroupEbsConfigArgs{
						Size:               pulumi.Int(40),
						Type:               pulumi.String("gp2"),
						VolumesPerInstance: pulumi.Int(1),
					},
				},
				BidPrice:          pulumi.String("0.30"),
				AutoscalingPolicy: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "\"Constraints\": {\n", "  \"MinCapacity\": 1,\n", "  \"MaxCapacity\": 2\n", "},\n", "\"Rules\": [\n", "  {\n", "    \"Name\": \"ScaleOutMemoryPercentage\",\n", "    \"Description\": \"Scale out if YARNMemoryAvailablePercentage is less than 15\",\n", "    \"Action\": {\n", "      \"SimpleScalingPolicyConfiguration\": {\n", "        \"AdjustmentType\": \"CHANGE_IN_CAPACITY\",\n", "        \"ScalingAdjustment\": 1,\n", "        \"CoolDown\": 300\n", "      }\n", "    },\n", "    \"Trigger\": {\n", "      \"CloudWatchAlarmDefinition\": {\n", "        \"ComparisonOperator\": \"LESS_THAN\",\n", "        \"EvaluationPeriods\": 1,\n", "        \"MetricName\": \"YARNMemoryAvailablePercentage\",\n", "        \"Namespace\": \"AWS/ElasticMapReduce\",\n", "        \"Period\": 300,\n", "        \"Statistic\": \"AVERAGE\",\n", "        \"Threshold\": 15.0,\n", "        \"Unit\": \"PERCENT\"\n", "      }\n", "    }\n", "  }\n", "]\n", "}\n")),
			},
			EbsRootVolumeSize: pulumi.Int(100),
			Tags: pulumi.StringMap{
				"role": pulumi.String("rolename"),
				"env":  pulumi.String("env"),
			},
			BootstrapActions: emr.ClusterBootstrapActionArray{
				&emr.ClusterBootstrapActionArgs{
					Path: pulumi.String("s3://elasticmapreduce/bootstrap-actions/run-if"),
					Name: pulumi.String("runif"),
					Args: pulumi.StringArray{
						pulumi.String("instance.isMaster=true"),
						pulumi.String("echo running on master node"),
					},
				},
			},
			ConfigurationsJson: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  [\n", "    {\n", "      \"Classification\": \"hadoop-env\",\n", "      \"Configurations\": [\n", "        {\n", "          \"Classification\": \"export\",\n", "          \"Properties\": {\n", "            \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n", "          }\n", "        }\n", "      ],\n", "      \"Properties\": {}\n", "    },\n", "    {\n", "      \"Classification\": \"spark-env\",\n", "      \"Configurations\": [\n", "        {\n", "          \"Classification\": \"export\",\n", "          \"Properties\": {\n", "            \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n", "          }\n", "        }\n", "      ],\n", "      \"Properties\": {}\n", "    }\n", "  ]\n")),
			ServiceRole:        pulumi.Any(aws_iam_role.Iam_emr_service_role.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cluster = new Cluster("cluster", ClusterArgs.builder()        
            .releaseLabel("emr-4.6.0")
            .applications("Spark")
            .additionalInfo("""
{
  "instanceAwsClientConfiguration": {
    "proxyPort": 8099,
    "proxyHost": "myproxy.example.com"
  }
}
            """)
            .terminationProtection(false)
            .keepJobFlowAliveWhenNoSteps(true)
            .ec2Attributes(ClusterEc2Attributes.builder()
                .subnetId(aws_subnet.getMain().getId())
                .emrManagedMasterSecurityGroup(aws_security_group.getSg().getId())
                .emrManagedSlaveSecurityGroup(aws_security_group.getSg().getId())
                .instanceProfile(aws_iam_instance_profile.getEmr_profile().getArn())
                .build())
            .masterInstanceGroup(ClusterMasterInstanceGroup.builder()
                .instanceType("m4.large")
                .build())
            .coreInstanceGroup(ClusterCoreInstanceGroup.builder()
                .instanceType("c4.large")
                .instanceCount(1)
                .ebsConfigs(ClusterCoreInstanceGroupEbsConfig.builder()
                    .size("40")
                    .type("gp2")
                    .volumesPerInstance(1)
                    .build())
                .bidPrice("0.30")
                .autoscalingPolicy("""
{
"Constraints": {
  "MinCapacity": 1,
  "MaxCapacity": 2
},
"Rules": [
  {
    "Name": "ScaleOutMemoryPercentage",
    "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
    "Action": {
      "SimpleScalingPolicyConfiguration": {
        "AdjustmentType": "CHANGE_IN_CAPACITY",
        "ScalingAdjustment": 1,
        "CoolDown": 300
      }
    },
    "Trigger": {
      "CloudWatchAlarmDefinition": {
        "ComparisonOperator": "LESS_THAN",
        "EvaluationPeriods": 1,
        "MetricName": "YARNMemoryAvailablePercentage",
        "Namespace": "AWS/ElasticMapReduce",
        "Period": 300,
        "Statistic": "AVERAGE",
        "Threshold": 15.0,
        "Unit": "PERCENT"
      }
    }
  }
]
}
                """)
                .build())
            .ebsRootVolumeSize(100)
            .tags(Map.ofEntries(
                Map.entry("role", "rolename"),
                Map.entry("env", "env")
            ))
            .bootstrapActions(ClusterBootstrapAction.builder()
                .path("s3://elasticmapreduce/bootstrap-actions/run-if")
                .name("runif")
                .args(                
                    "instance.isMaster=true",
                    "echo running on master node")
                .build())
            .configurationsJson("""
  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
            """)
            .serviceRole(aws_iam_role.getIam_emr_service_role().getArn())
            .build());

        }
}
import pulumi
import pulumi_aws as aws

cluster = aws.emr.Cluster("cluster",
    release_label="emr-4.6.0",
    applications=["Spark"],
    additional_info="""{
  "instanceAwsClientConfiguration": {
    "proxyPort": 8099,
    "proxyHost": "myproxy.example.com"
  }
}
""",
    termination_protection=False,
    keep_job_flow_alive_when_no_steps=True,
    ec2_attributes=aws.emr.ClusterEc2AttributesArgs(
        subnet_id=aws_subnet["main"]["id"],
        emr_managed_master_security_group=aws_security_group["sg"]["id"],
        emr_managed_slave_security_group=aws_security_group["sg"]["id"],
        instance_profile=aws_iam_instance_profile["emr_profile"]["arn"],
    ),
    master_instance_group=aws.emr.ClusterMasterInstanceGroupArgs(
        instance_type="m4.large",
    ),
    core_instance_group=aws.emr.ClusterCoreInstanceGroupArgs(
        instance_type="c4.large",
        instance_count=1,
        ebs_configs=[aws.emr.ClusterCoreInstanceGroupEbsConfigArgs(
            size=40,
            type="gp2",
            volumes_per_instance=1,
        )],
        bid_price="0.30",
        autoscaling_policy="""{
"Constraints": {
  "MinCapacity": 1,
  "MaxCapacity": 2
},
"Rules": [
  {
    "Name": "ScaleOutMemoryPercentage",
    "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
    "Action": {
      "SimpleScalingPolicyConfiguration": {
        "AdjustmentType": "CHANGE_IN_CAPACITY",
        "ScalingAdjustment": 1,
        "CoolDown": 300
      }
    },
    "Trigger": {
      "CloudWatchAlarmDefinition": {
        "ComparisonOperator": "LESS_THAN",
        "EvaluationPeriods": 1,
        "MetricName": "YARNMemoryAvailablePercentage",
        "Namespace": "AWS/ElasticMapReduce",
        "Period": 300,
        "Statistic": "AVERAGE",
        "Threshold": 15.0,
        "Unit": "PERCENT"
      }
    }
  }
]
}
""",
    ),
    ebs_root_volume_size=100,
    tags={
        "role": "rolename",
        "env": "env",
    },
    bootstrap_actions=[aws.emr.ClusterBootstrapActionArgs(
        path="s3://elasticmapreduce/bootstrap-actions/run-if",
        name="runif",
        args=[
            "instance.isMaster=true",
            "echo running on master node",
        ],
    )],
    configurations_json="""  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
""",
    service_role=aws_iam_role["iam_emr_service_role"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const cluster = new aws.emr.Cluster("cluster", {
    releaseLabel: "emr-4.6.0",
    applications: ["Spark"],
    additionalInfo: `{
  "instanceAwsClientConfiguration": {
    "proxyPort": 8099,
    "proxyHost": "myproxy.example.com"
  }
}
`,
    terminationProtection: false,
    keepJobFlowAliveWhenNoSteps: true,
    ec2Attributes: {
        subnetId: aws_subnet.main.id,
        emrManagedMasterSecurityGroup: aws_security_group.sg.id,
        emrManagedSlaveSecurityGroup: aws_security_group.sg.id,
        instanceProfile: aws_iam_instance_profile.emr_profile.arn,
    },
    masterInstanceGroup: {
        instanceType: "m4.large",
    },
    coreInstanceGroup: {
        instanceType: "c4.large",
        instanceCount: 1,
        ebsConfigs: [{
            size: 40,
            type: "gp2",
            volumesPerInstance: 1,
        }],
        bidPrice: "0.30",
        autoscalingPolicy: `{
"Constraints": {
  "MinCapacity": 1,
  "MaxCapacity": 2
},
"Rules": [
  {
    "Name": "ScaleOutMemoryPercentage",
    "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
    "Action": {
      "SimpleScalingPolicyConfiguration": {
        "AdjustmentType": "CHANGE_IN_CAPACITY",
        "ScalingAdjustment": 1,
        "CoolDown": 300
      }
    },
    "Trigger": {
      "CloudWatchAlarmDefinition": {
        "ComparisonOperator": "LESS_THAN",
        "EvaluationPeriods": 1,
        "MetricName": "YARNMemoryAvailablePercentage",
        "Namespace": "AWS/ElasticMapReduce",
        "Period": 300,
        "Statistic": "AVERAGE",
        "Threshold": 15.0,
        "Unit": "PERCENT"
      }
    }
  }
]
}
`,
    },
    ebsRootVolumeSize: 100,
    tags: {
        role: "rolename",
        env: "env",
    },
    bootstrapActions: [{
        path: "s3://elasticmapreduce/bootstrap-actions/run-if",
        name: "runif",
        args: [
            "instance.isMaster=true",
            "echo running on master node",
        ],
    }],
    configurationsJson: `  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
`,
    serviceRole: aws_iam_role.iam_emr_service_role.arn,
});
resources:
  cluster:
    type: aws:emr:Cluster
    properties:
      releaseLabel: emr-4.6.0
      applications:
        - Spark
      additionalInfo: |
        {
          "instanceAwsClientConfiguration": {
            "proxyPort": 8099,
            "proxyHost": "myproxy.example.com"
          }
        }        
      terminationProtection: false
      keepJobFlowAliveWhenNoSteps: true
      ec2Attributes:
        subnetId: ${aws_subnet.main.id}
        emrManagedMasterSecurityGroup: ${aws_security_group.sg.id}
        emrManagedSlaveSecurityGroup: ${aws_security_group.sg.id}
        instanceProfile: ${aws_iam_instance_profile.emr_profile.arn}
      masterInstanceGroup:
        instanceType: m4.large
      coreInstanceGroup:
        instanceType: c4.large
        instanceCount: 1
        ebsConfigs:
          - size: 40
            type: gp2
            volumesPerInstance: 1
        bidPrice: 0.30
        autoscalingPolicy: |
          {
          "Constraints": {
            "MinCapacity": 1,
            "MaxCapacity": 2
          },
          "Rules": [
            {
              "Name": "ScaleOutMemoryPercentage",
              "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
              "Action": {
                "SimpleScalingPolicyConfiguration": {
                  "AdjustmentType": "CHANGE_IN_CAPACITY",
                  "ScalingAdjustment": 1,
                  "CoolDown": 300
                }
              },
              "Trigger": {
                "CloudWatchAlarmDefinition": {
                  "ComparisonOperator": "LESS_THAN",
                  "EvaluationPeriods": 1,
                  "MetricName": "YARNMemoryAvailablePercentage",
                  "Namespace": "AWS/ElasticMapReduce",
                  "Period": 300,
                  "Statistic": "AVERAGE",
                  "Threshold": 15.0,
                  "Unit": "PERCENT"
                }
              }
            }
          ]
          }          
      ebsRootVolumeSize: 100
      tags:
        role: rolename
        env: env
      bootstrapActions:
        - path: s3://elasticmapreduce/bootstrap-actions/run-if
          name: runif
          args:
            - instance.isMaster=true
            - echo running on master node
      configurationsJson: |2
          [
            {
              "Classification": "hadoop-env",
              "Configurations": [
                {
                  "Classification": "export",
                  "Properties": {
                    "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
                  }
                }
              ],
              "Properties": {}
            },
            {
              "Classification": "spark-env",
              "Configurations": [
                {
                  "Classification": "export",
                  "Properties": {
                    "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
                  }
                }
              ],
              "Properties": {}
            }
          ]
      serviceRole: ${aws_iam_role.iam_emr_service_role.arn}

Instance Fleet

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Emr.Cluster("example", new Aws.Emr.ClusterArgs
        {
            MasterInstanceFleet = new Aws.Emr.Inputs.ClusterMasterInstanceFleetArgs
            {
                InstanceTypeConfigs = 
                {
                    new Aws.Emr.Inputs.ClusterMasterInstanceFleetInstanceTypeConfigArgs
                    {
                        InstanceType = "m4.xlarge",
                    },
                },
                TargetOnDemandCapacity = 1,
            },
            CoreInstanceFleet = new Aws.Emr.Inputs.ClusterCoreInstanceFleetArgs
            {
                InstanceTypeConfigs = 
                {
                    new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
                    {
                        BidPriceAsPercentageOfOnDemandPrice = 80,
                        EbsConfigs = 
                        {
                            new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
                            {
                                Size = 100,
                                Type = "gp2",
                                VolumesPerInstance = 1,
                            },
                        },
                        InstanceType = "m3.xlarge",
                        WeightedCapacity = 1,
                    },
                    new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
                    {
                        BidPriceAsPercentageOfOnDemandPrice = 100,
                        EbsConfigs = 
                        {
                            new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
                            {
                                Size = 100,
                                Type = "gp2",
                                VolumesPerInstance = 1,
                            },
                        },
                        InstanceType = "m4.xlarge",
                        WeightedCapacity = 1,
                    },
                    new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigArgs
                    {
                        BidPriceAsPercentageOfOnDemandPrice = 100,
                        EbsConfigs = 
                        {
                            new Aws.Emr.Inputs.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs
                            {
                                Size = 100,
                                Type = "gp2",
                                VolumesPerInstance = 1,
                            },
                        },
                        InstanceType = "m4.2xlarge",
                        WeightedCapacity = 2,
                    },
                },
                LaunchSpecifications = new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsArgs
                {
                    SpotSpecifications = 
                    {
                        new Aws.Emr.Inputs.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs
                        {
                            AllocationStrategy = "capacity-optimized",
                            BlockDurationMinutes = 0,
                            TimeoutAction = "SWITCH_TO_ON_DEMAND",
                            TimeoutDurationMinutes = 10,
                        },
                    },
                },
                Name = "core fleet",
                TargetOnDemandCapacity = 2,
                TargetSpotCapacity = 2,
            },
        });
        var task = new Aws.Emr.InstanceFleet("task", new Aws.Emr.InstanceFleetArgs
        {
            ClusterId = example.Id,
            InstanceTypeConfigs = 
            {
                new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs
                {
                    BidPriceAsPercentageOfOnDemandPrice = 100,
                    EbsConfigs = 
                    {
                        new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs
                        {
                            Size = 100,
                            Type = "gp2",
                            VolumesPerInstance = 1,
                        },
                    },
                    InstanceType = "m4.xlarge",
                    WeightedCapacity = 1,
                },
                new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigArgs
                {
                    BidPriceAsPercentageOfOnDemandPrice = 100,
                    EbsConfigs = 
                    {
                        new Aws.Emr.Inputs.InstanceFleetInstanceTypeConfigEbsConfigArgs
                        {
                            Size = 100,
                            Type = "gp2",
                            VolumesPerInstance = 1,
                        },
                    },
                    InstanceType = "m4.2xlarge",
                    WeightedCapacity = 2,
                },
            },
            LaunchSpecifications = new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsArgs
            {
                SpotSpecifications = 
                {
                    new Aws.Emr.Inputs.InstanceFleetLaunchSpecificationsSpotSpecificationArgs
                    {
                        AllocationStrategy = "capacity-optimized",
                        BlockDurationMinutes = 0,
                        TimeoutAction = "TERMINATE_CLUSTER",
                        TimeoutDurationMinutes = 10,
                    },
                },
            },
            TargetOnDemandCapacity = 1,
            TargetSpotCapacity = 1,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
			MasterInstanceFleet: &emr.ClusterMasterInstanceFleetArgs{
				InstanceTypeConfigs: emr.ClusterMasterInstanceFleetInstanceTypeConfigArray{
					&emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs{
						InstanceType: pulumi.String("m4.xlarge"),
					},
				},
				TargetOnDemandCapacity: pulumi.Int(1),
			},
			CoreInstanceFleet: &emr.ClusterCoreInstanceFleetArgs{
				InstanceTypeConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigArray{
					&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
						BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(80),
						EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
							&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
								Size:               pulumi.Int(100),
								Type:               pulumi.String("gp2"),
								VolumesPerInstance: pulumi.Int(1),
							},
						},
						InstanceType:     pulumi.String("m3.xlarge"),
						WeightedCapacity: pulumi.Int(1),
					},
					&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
						BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
						EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
							&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
								Size:               pulumi.Int(100),
								Type:               pulumi.String("gp2"),
								VolumesPerInstance: pulumi.Int(1),
							},
						},
						InstanceType:     pulumi.String("m4.xlarge"),
						WeightedCapacity: pulumi.Int(1),
					},
					&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
						BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
						EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
							&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
								Size:               pulumi.Int(100),
								Type:               pulumi.String("gp2"),
								VolumesPerInstance: pulumi.Int(1),
							},
						},
						InstanceType:     pulumi.String("m4.2xlarge"),
						WeightedCapacity: pulumi.Int(2),
					},
				},
				LaunchSpecifications: &emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs{
					SpotSpecifications: emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArray{
						&emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs{
							AllocationStrategy:     pulumi.String("capacity-optimized"),
							BlockDurationMinutes:   pulumi.Int(0),
							TimeoutAction:          pulumi.String("SWITCH_TO_ON_DEMAND"),
							TimeoutDurationMinutes: pulumi.Int(10),
						},
					},
				},
				Name:                   pulumi.String("core fleet"),
				TargetOnDemandCapacity: pulumi.Int(2),
				TargetSpotCapacity:     pulumi.Int(2),
			},
		})
		if err != nil {
			return err
		}
		_, err = emr.NewInstanceFleet(ctx, "task", &emr.InstanceFleetArgs{
			ClusterId: example.ID(),
			InstanceTypeConfigs: emr.InstanceFleetInstanceTypeConfigArray{
				&emr.InstanceFleetInstanceTypeConfigArgs{
					BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
					EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
						&emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
							Size:               pulumi.Int(100),
							Type:               pulumi.String("gp2"),
							VolumesPerInstance: pulumi.Int(1),
						},
					},
					InstanceType:     pulumi.String("m4.xlarge"),
					WeightedCapacity: pulumi.Int(1),
				},
				&emr.InstanceFleetInstanceTypeConfigArgs{
					BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
					EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
						&emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
							Size:               pulumi.Int(100),
							Type:               pulumi.String("gp2"),
							VolumesPerInstance: pulumi.Int(1),
						},
					},
					InstanceType:     pulumi.String("m4.2xlarge"),
					WeightedCapacity: pulumi.Int(2),
				},
			},
			LaunchSpecifications: &emr.InstanceFleetLaunchSpecificationsArgs{
				SpotSpecifications: emr.InstanceFleetLaunchSpecificationsSpotSpecificationArray{
					&emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs{
						AllocationStrategy:     pulumi.String("capacity-optimized"),
						BlockDurationMinutes:   pulumi.Int(0),
						TimeoutAction:          pulumi.String("TERMINATE_CLUSTER"),
						TimeoutDurationMinutes: pulumi.Int(10),
					},
				},
			},
			TargetOnDemandCapacity: pulumi.Int(1),
			TargetSpotCapacity:     pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Cluster("example", ClusterArgs.builder()        
            .masterInstanceFleet(ClusterMasterInstanceFleet.builder()
                .instanceTypeConfigs(ClusterMasterInstanceFleetInstanceTypeConfig.builder()
                    .instanceType("m4.xlarge")
                    .build())
                .targetOnDemandCapacity(1)
                .build())
            .coreInstanceFleet(ClusterCoreInstanceFleet.builder()
                .instanceTypeConfigs(                
                    ClusterCoreInstanceFleetInstanceTypeConfig.builder()
                        .bidPriceAsPercentageOfOnDemandPrice(80)
                        .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig.builder()
                            .size(100)
                            .type("gp2")
                            .volumesPerInstance(1)
                            .build())
                        .instanceType("m3.xlarge")
                        .weightedCapacity(1)
                        .build(),
                    ClusterCoreInstanceFleetInstanceTypeConfig.builder()
                        .bidPriceAsPercentageOfOnDemandPrice(100)
                        .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig.builder()
                            .size(100)
                            .type("gp2")
                            .volumesPerInstance(1)
                            .build())
                        .instanceType("m4.xlarge")
                        .weightedCapacity(1)
                        .build(),
                    ClusterCoreInstanceFleetInstanceTypeConfig.builder()
                        .bidPriceAsPercentageOfOnDemandPrice(100)
                        .ebsConfigs(ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig.builder()
                            .size(100)
                            .type("gp2")
                            .volumesPerInstance(1)
                            .build())
                        .instanceType("m4.2xlarge")
                        .weightedCapacity(2)
                        .build())
                .launchSpecifications(ClusterCoreInstanceFleetLaunchSpecifications.builder()
                    .spotSpecifications(ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification.builder()
                        .allocationStrategy("capacity-optimized")
                        .blockDurationMinutes(0)
                        .timeoutAction("SWITCH_TO_ON_DEMAND")
                        .timeoutDurationMinutes(10)
                        .build())
                    .build())
                .name("core fleet")
                .targetOnDemandCapacity(2)
                .targetSpotCapacity(2)
                .build())
            .build());

        var task = new InstanceFleet("task", InstanceFleetArgs.builder()        
            .clusterId(example.getId())
            .instanceTypeConfigs(            
                InstanceFleetInstanceTypeConfig.builder()
                    .bidPriceAsPercentageOfOnDemandPrice(100)
                    .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfig.builder()
                        .size(100)
                        .type("gp2")
                        .volumesPerInstance(1)
                        .build())
                    .instanceType("m4.xlarge")
                    .weightedCapacity(1)
                    .build(),
                InstanceFleetInstanceTypeConfig.builder()
                    .bidPriceAsPercentageOfOnDemandPrice(100)
                    .ebsConfigs(InstanceFleetInstanceTypeConfigEbsConfig.builder()
                        .size(100)
                        .type("gp2")
                        .volumesPerInstance(1)
                        .build())
                    .instanceType("m4.2xlarge")
                    .weightedCapacity(2)
                    .build())
            .launchSpecifications(InstanceFleetLaunchSpecifications.builder()
                .spotSpecifications(InstanceFleetLaunchSpecificationsSpotSpecification.builder()
                    .allocationStrategy("capacity-optimized")
                    .blockDurationMinutes(0)
                    .timeoutAction("TERMINATE_CLUSTER")
                    .timeoutDurationMinutes(10)
                    .build())
                .build())
            .targetOnDemandCapacity(1)
            .targetSpotCapacity(1)
            .build());

        }
}
import pulumi
import pulumi_aws as aws

example = aws.emr.Cluster("example",
    master_instance_fleet=aws.emr.ClusterMasterInstanceFleetArgs(
        instance_type_configs=[aws.emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs(
            instance_type="m4.xlarge",
        )],
        target_on_demand_capacity=1,
    ),
    core_instance_fleet=aws.emr.ClusterCoreInstanceFleetArgs(
        instance_type_configs=[
            aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs(
                bid_price_as_percentage_of_on_demand_price=80,
                ebs_configs=[aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs(
                    size=100,
                    type="gp2",
                    volumes_per_instance=1,
                )],
                instance_type="m3.xlarge",
                weighted_capacity=1,
            ),
            aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs(
                bid_price_as_percentage_of_on_demand_price=100,
                ebs_configs=[aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs(
                    size=100,
                    type="gp2",
                    volumes_per_instance=1,
                )],
                instance_type="m4.xlarge",
                weighted_capacity=1,
            ),
            aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs(
                bid_price_as_percentage_of_on_demand_price=100,
                ebs_configs=[aws.emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs(
                    size=100,
                    type="gp2",
                    volumes_per_instance=1,
                )],
                instance_type="m4.2xlarge",
                weighted_capacity=2,
            ),
        ],
        launch_specifications=aws.emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs(
            spot_specifications=[aws.emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs(
                allocation_strategy="capacity-optimized",
                block_duration_minutes=0,
                timeout_action="SWITCH_TO_ON_DEMAND",
                timeout_duration_minutes=10,
            )],
        ),
        name="core fleet",
        target_on_demand_capacity=2,
        target_spot_capacity=2,
    ))
task = aws.emr.InstanceFleet("task",
    cluster_id=example.id,
    instance_type_configs=[
        aws.emr.InstanceFleetInstanceTypeConfigArgs(
            bid_price_as_percentage_of_on_demand_price=100,
            ebs_configs=[aws.emr.InstanceFleetInstanceTypeConfigEbsConfigArgs(
                size=100,
                type="gp2",
                volumes_per_instance=1,
            )],
            instance_type="m4.xlarge",
            weighted_capacity=1,
        ),
        aws.emr.InstanceFleetInstanceTypeConfigArgs(
            bid_price_as_percentage_of_on_demand_price=100,
            ebs_configs=[aws.emr.InstanceFleetInstanceTypeConfigEbsConfigArgs(
                size=100,
                type="gp2",
                volumes_per_instance=1,
            )],
            instance_type="m4.2xlarge",
            weighted_capacity=2,
        ),
    ],
    launch_specifications=aws.emr.InstanceFleetLaunchSpecificationsArgs(
        spot_specifications=[aws.emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs(
            allocation_strategy="capacity-optimized",
            block_duration_minutes=0,
            timeout_action="TERMINATE_CLUSTER",
            timeout_duration_minutes=10,
        )],
    ),
    target_on_demand_capacity=1,
    target_spot_capacity=1)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.emr.Cluster("example", {
    masterInstanceFleet: {
        instanceTypeConfigs: [{
            instanceType: "m4.xlarge",
        }],
        targetOnDemandCapacity: 1,
    },
    coreInstanceFleet: {
        instanceTypeConfigs: [
            {
                bidPriceAsPercentageOfOnDemandPrice: 80,
                ebsConfigs: [{
                    size: 100,
                    type: "gp2",
                    volumesPerInstance: 1,
                }],
                instanceType: "m3.xlarge",
                weightedCapacity: 1,
            },
            {
                bidPriceAsPercentageOfOnDemandPrice: 100,
                ebsConfigs: [{
                    size: 100,
                    type: "gp2",
                    volumesPerInstance: 1,
                }],
                instanceType: "m4.xlarge",
                weightedCapacity: 1,
            },
            {
                bidPriceAsPercentageOfOnDemandPrice: 100,
                ebsConfigs: [{
                    size: 100,
                    type: "gp2",
                    volumesPerInstance: 1,
                }],
                instanceType: "m4.2xlarge",
                weightedCapacity: 2,
            },
        ],
        launchSpecifications: {
            spotSpecifications: [{
                allocationStrategy: "capacity-optimized",
                blockDurationMinutes: 0,
                timeoutAction: "SWITCH_TO_ON_DEMAND",
                timeoutDurationMinutes: 10,
            }],
        },
        name: "core fleet",
        targetOnDemandCapacity: 2,
        targetSpotCapacity: 2,
    },
});
const task = new aws.emr.InstanceFleet("task", {
    clusterId: example.id,
    instanceTypeConfigs: [
        {
            bidPriceAsPercentageOfOnDemandPrice: 100,
            ebsConfigs: [{
                size: 100,
                type: "gp2",
                volumesPerInstance: 1,
            }],
            instanceType: "m4.xlarge",
            weightedCapacity: 1,
        },
        {
            bidPriceAsPercentageOfOnDemandPrice: 100,
            ebsConfigs: [{
                size: 100,
                type: "gp2",
                volumesPerInstance: 1,
            }],
            instanceType: "m4.2xlarge",
            weightedCapacity: 2,
        },
    ],
    launchSpecifications: {
        spotSpecifications: [{
            allocationStrategy: "capacity-optimized",
            blockDurationMinutes: 0,
            timeoutAction: "TERMINATE_CLUSTER",
            timeoutDurationMinutes: 10,
        }],
    },
    targetOnDemandCapacity: 1,
    targetSpotCapacity: 1,
});
resources:
  example:
    type: aws:emr:Cluster
    properties:
      masterInstanceFleet:
        instanceTypeConfigs:
          - instanceType: m4.xlarge
        targetOnDemandCapacity: 1
      coreInstanceFleet:
        instanceTypeConfigs:
          - bidPriceAsPercentageOfOnDemandPrice: 80
            ebsConfigs:
              - size: 100
                type: gp2
                volumesPerInstance: 1
            instanceType: m3.xlarge
            weightedCapacity: 1
          - bidPriceAsPercentageOfOnDemandPrice: 100
            ebsConfigs:
              - size: 100
                type: gp2
                volumesPerInstance: 1
            instanceType: m4.xlarge
            weightedCapacity: 1
          - bidPriceAsPercentageOfOnDemandPrice: 100
            ebsConfigs:
              - size: 100
                type: gp2
                volumesPerInstance: 1
            instanceType: m4.2xlarge
            weightedCapacity: 2
        launchSpecifications:
          spotSpecifications:
            - allocationStrategy: capacity-optimized
              blockDurationMinutes: 0
              timeoutAction: SWITCH_TO_ON_DEMAND
              timeoutDurationMinutes: 10
        name: core fleet
        targetOnDemandCapacity: 2
        targetSpotCapacity: 2
  task:
    type: aws:emr:InstanceFleet
    properties:
      clusterId: ${example.id}
      instanceTypeConfigs:
        - bidPriceAsPercentageOfOnDemandPrice: 100
          ebsConfigs:
            - size: 100
              type: gp2
              volumesPerInstance: 1
          instanceType: m4.xlarge
          weightedCapacity: 1
        - bidPriceAsPercentageOfOnDemandPrice: 100
          ebsConfigs:
            - size: 100
              type: gp2
              volumesPerInstance: 1
          instanceType: m4.2xlarge
          weightedCapacity: 2
      launchSpecifications:
        spotSpecifications:
          - allocationStrategy: capacity-optimized
            blockDurationMinutes: 0
            timeoutAction: TERMINATE_CLUSTER
            timeoutDurationMinutes: 10
      targetOnDemandCapacity: 1
      targetSpotCapacity: 1

Enable Debug Logging

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // ... other configuration ...
        var example = new Aws.Emr.Cluster("example", new Aws.Emr.ClusterArgs
        {
            Steps = 
            {
                new Aws.Emr.Inputs.ClusterStepArgs
                {
                    ActionOnFailure = "TERMINATE_CLUSTER",
                    Name = "Setup Hadoop Debugging",
                    HadoopJarStep = new Aws.Emr.Inputs.ClusterStepHadoopJarStepArgs
                    {
                        Jar = "command-runner.jar",
                        Args = 
                        {
                            "state-pusher-script",
                        },
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
			Steps: emr.ClusterStepArray{
				&emr.ClusterStepArgs{
					ActionOnFailure: pulumi.String("TERMINATE_CLUSTER"),
					Name:            pulumi.String("Setup Hadoop Debugging"),
					HadoopJarStep: &emr.ClusterStepHadoopJarStepArgs{
						Jar: pulumi.String("command-runner.jar"),
						Args: pulumi.StringArray{
							pulumi.String("state-pusher-script"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Cluster("example", ClusterArgs.builder()        
            .steps(ClusterStep.builder()
                .actionOnFailure("TERMINATE_CLUSTER")
                .name("Setup Hadoop Debugging")
                .hadoopJarStep(ClusterStepHadoopJarStep.builder()
                    .jar("command-runner.jar")
                    .args("state-pusher-script")
                    .build())
                .build())
            .build());

        }
}
import pulumi
import pulumi_aws as aws

# ... other configuration ...
example = aws.emr.Cluster("example", steps=[aws.emr.ClusterStepArgs(
    action_on_failure="TERMINATE_CLUSTER",
    name="Setup Hadoop Debugging",
    hadoop_jar_step=aws.emr.ClusterStepHadoopJarStepArgs(
        jar="command-runner.jar",
        args=["state-pusher-script"],
    ),
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// ... other configuration ...
const example = new aws.emr.Cluster("example", {steps: [{
    actionOnFailure: "TERMINATE_CLUSTER",
    name: "Setup Hadoop Debugging",
    hadoopJarStep: {
        jar: "command-runner.jar",
        args: ["state-pusher-script"],
    },
}]});
resources:
  example:
    type: aws:emr:Cluster
    properties:
      steps:
        - actionOnFailure: TERMINATE_CLUSTER
          name: Setup Hadoop Debugging
          hadoopJarStep:
            jar: command-runner.jar
            args:
              - state-pusher-script

Multiple Node Master Instance Group

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // This configuration is for illustrative purposes and highlights
        // only relevant configurations for working with this functionality.
        // Map public IP on launch must be enabled for public (Internet accessible) subnets
        // ... other configuration ...
        var exampleSubnet = new Aws.Ec2.Subnet("exampleSubnet", new Aws.Ec2.SubnetArgs
        {
            MapPublicIpOnLaunch = true,
        });
        // ... other configuration ...
        var exampleCluster = new Aws.Emr.Cluster("exampleCluster", new Aws.Emr.ClusterArgs
        {
            ReleaseLabel = "emr-5.24.1",
            TerminationProtection = true,
            Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs
            {
                SubnetId = exampleSubnet.Id,
            },
            MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs
            {
                InstanceCount = 3,
            },
            CoreInstanceGroup = ,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleSubnet, err := ec2.NewSubnet(ctx, "exampleSubnet", &ec2.SubnetArgs{
			MapPublicIpOnLaunch: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = emr.NewCluster(ctx, "exampleCluster", &emr.ClusterArgs{
			ReleaseLabel:          pulumi.String("emr-5.24.1"),
			TerminationProtection: pulumi.Bool(true),
			Ec2Attributes: &emr.ClusterEc2AttributesArgs{
				SubnetId: exampleSubnet.ID(),
			},
			MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
				InstanceCount: pulumi.Int(3),
			},
			CoreInstanceGroup: nil,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()        
            .mapPublicIpOnLaunch(true)
            .build());

        var exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()        
            .releaseLabel("emr-5.24.1")
            .terminationProtection(true)
            .ec2Attributes(ClusterEc2Attributes.builder()
                .subnetId(exampleSubnet.getId())
                .build())
            .masterInstanceGroup(ClusterMasterInstanceGroup.builder()
                .instanceCount(3)
                .build())
            .coreInstanceGroup()
            .build());

        }
}
import pulumi
import pulumi_aws as aws

# This configuration is for illustrative purposes and highlights
# only relevant configurations for working with this functionality.
# Map public IP on launch must be enabled for public (Internet accessible) subnets
# ... other configuration ...
example_subnet = aws.ec2.Subnet("exampleSubnet", map_public_ip_on_launch=True)
# ... other configuration ...
example_cluster = aws.emr.Cluster("exampleCluster",
    release_label="emr-5.24.1",
    termination_protection=True,
    ec2_attributes=aws.emr.ClusterEc2AttributesArgs(
        subnet_id=example_subnet.id,
    ),
    master_instance_group=aws.emr.ClusterMasterInstanceGroupArgs(
        instance_count=3,
    ),
    core_instance_group=aws.emr.ClusterCoreInstanceGroupArgs())
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// This configuration is for illustrative purposes and highlights
// only relevant configurations for working with this functionality.
// Map public IP on launch must be enabled for public (Internet accessible) subnets
// ... other configuration ...
const exampleSubnet = new aws.ec2.Subnet("exampleSubnet", {mapPublicIpOnLaunch: true});
// ... other configuration ...
const exampleCluster = new aws.emr.Cluster("exampleCluster", {
    releaseLabel: "emr-5.24.1",
    terminationProtection: true,
    ec2Attributes: {
        subnetId: exampleSubnet.id,
    },
    masterInstanceGroup: {
        instanceCount: 3,
    },
    coreInstanceGroup: {},
});
resources:
  exampleSubnet:
    type: aws:ec2:Subnet
    properties:
      mapPublicIpOnLaunch: true
  exampleCluster:
    type: aws:emr:Cluster
    properties:
      releaseLabel: emr-5.24.1
      terminationProtection: true
      ec2Attributes:
        subnetId: ${exampleSubnet.id}
      masterInstanceGroup:
        instanceCount: 3
      coreInstanceGroup: {}

Bootable Cluster

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var mainVpc = new Aws.Ec2.Vpc("mainVpc", new Aws.Ec2.VpcArgs
        {
            CidrBlock = "168.31.0.0/16",
            EnableDnsHostnames = true,
            Tags = 
            {
                { "name", "emr_test" },
            },
        });
        var mainSubnet = new Aws.Ec2.Subnet("mainSubnet", new Aws.Ec2.SubnetArgs
        {
            VpcId = mainVpc.Id,
            CidrBlock = "168.31.0.0/20",
            Tags = 
            {
                { "name", "emr_test" },
            },
        });
        var allowAccess = new Aws.Ec2.SecurityGroup("allowAccess", new Aws.Ec2.SecurityGroupArgs
        {
            Description = "Allow inbound traffic",
            VpcId = mainVpc.Id,
            Ingress = 
            {
                new Aws.Ec2.Inputs.SecurityGroupIngressArgs
                {
                    FromPort = 0,
                    ToPort = 0,
                    Protocol = "-1",
                    CidrBlocks = 
                    {
                        mainVpc.CidrBlock,
                    },
                },
            },
            Egress = 
            {
                new Aws.Ec2.Inputs.SecurityGroupEgressArgs
                {
                    FromPort = 0,
                    ToPort = 0,
                    Protocol = "-1",
                    CidrBlocks = 
                    {
                        "0.0.0.0/0",
                    },
                },
            },
            Tags = 
            {
                { "name", "emr_test" },
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                mainSubnet,
            },
        });
        // IAM role for EMR Service
        var iamEmrServiceRole = new Aws.Iam.Role("iamEmrServiceRole", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2008-10-17"",
  ""Statement"": [
    {
      ""Sid"": """",
      ""Effect"": ""Allow"",
      ""Principal"": {
        ""Service"": ""elasticmapreduce.amazonaws.com""
      },
      ""Action"": ""sts:AssumeRole""
    }
  ]
}
",
        });
        // IAM Role for EC2 Instance Profile
        var iamEmrProfileRole = new Aws.Iam.Role("iamEmrProfileRole", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2008-10-17"",
  ""Statement"": [
    {
      ""Sid"": """",
      ""Effect"": ""Allow"",
      ""Principal"": {
        ""Service"": ""ec2.amazonaws.com""
      },
      ""Action"": ""sts:AssumeRole""
    }
  ]
}
",
        });
        var emrProfile = new Aws.Iam.InstanceProfile("emrProfile", new Aws.Iam.InstanceProfileArgs
        {
            Role = iamEmrProfileRole.Name,
        });
        var cluster = new Aws.Emr.Cluster("cluster", new Aws.Emr.ClusterArgs
        {
            ReleaseLabel = "emr-4.6.0",
            Applications = 
            {
                "Spark",
            },
            Ec2Attributes = new Aws.Emr.Inputs.ClusterEc2AttributesArgs
            {
                SubnetId = mainSubnet.Id,
                EmrManagedMasterSecurityGroup = allowAccess.Id,
                EmrManagedSlaveSecurityGroup = allowAccess.Id,
                InstanceProfile = emrProfile.Arn,
            },
            MasterInstanceGroup = new Aws.Emr.Inputs.ClusterMasterInstanceGroupArgs
            {
                InstanceType = "m5.xlarge",
            },
            CoreInstanceGroup = new Aws.Emr.Inputs.ClusterCoreInstanceGroupArgs
            {
                InstanceCount = 1,
                InstanceType = "m5.xlarge",
            },
            Tags = 
            {
                { "role", "rolename" },
                { "dns_zone", "env_zone" },
                { "env", "env" },
                { "name", "name-env" },
            },
            BootstrapActions = 
            {
                new Aws.Emr.Inputs.ClusterBootstrapActionArgs
                {
                    Path = "s3://elasticmapreduce/bootstrap-actions/run-if",
                    Name = "runif",
                    Args = 
                    {
                        "instance.isMaster=true",
                        "echo running on master node",
                    },
                },
            },
            ConfigurationsJson = @"  [
    {
      ""Classification"": ""hadoop-env"",
      ""Configurations"": [
        {
          ""Classification"": ""export"",
          ""Properties"": {
            ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
          }
        }
      ],
      ""Properties"": {}
    },
    {
      ""Classification"": ""spark-env"",
      ""Configurations"": [
        {
          ""Classification"": ""export"",
          ""Properties"": {
            ""JAVA_HOME"": ""/usr/lib/jvm/java-1.8.0""
          }
        }
      ],
      ""Properties"": {}
    }
  ]
",
            ServiceRole = iamEmrServiceRole.Arn,
        });
        var gw = new Aws.Ec2.InternetGateway("gw", new Aws.Ec2.InternetGatewayArgs
        {
            VpcId = mainVpc.Id,
        });
        var routeTable = new Aws.Ec2.RouteTable("routeTable", new Aws.Ec2.RouteTableArgs
        {
            VpcId = mainVpc.Id,
            Routes = 
            {
                new Aws.Ec2.Inputs.RouteTableRouteArgs
                {
                    CidrBlock = "0.0.0.0/0",
                    GatewayId = gw.Id,
                },
            },
        });
        var mainRouteTableAssociation = new Aws.Ec2.MainRouteTableAssociation("mainRouteTableAssociation", new Aws.Ec2.MainRouteTableAssociationArgs
        {
            VpcId = mainVpc.Id,
            RouteTableId = routeTable.Id,
        });
        //##
        var iamEmrServicePolicy = new Aws.Iam.RolePolicy("iamEmrServicePolicy", new Aws.Iam.RolePolicyArgs
        {
            Role = iamEmrServiceRole.Id,
            Policy = @"{
    ""Version"": ""2012-10-17"",
    ""Statement"": [{
        ""Effect"": ""Allow"",
        ""Resource"": ""*"",
        ""Action"": [
            ""ec2:AuthorizeSecurityGroupEgress"",
            ""ec2:AuthorizeSecurityGroupIngress"",
            ""ec2:CancelSpotInstanceRequests"",
            ""ec2:CreateNetworkInterface"",
            ""ec2:CreateSecurityGroup"",
            ""ec2:CreateTags"",
            ""ec2:DeleteNetworkInterface"",
            ""ec2:DeleteSecurityGroup"",
            ""ec2:DeleteTags"",
            ""ec2:DescribeAvailabilityZones"",
            ""ec2:DescribeAccountAttributes"",
            ""ec2:DescribeDhcpOptions"",
            ""ec2:DescribeInstanceStatus"",
            ""ec2:DescribeInstances"",
            ""ec2:DescribeKeyPairs"",
            ""ec2:DescribeNetworkAcls"",
            ""ec2:DescribeNetworkInterfaces"",
            ""ec2:DescribePrefixLists"",
            ""ec2:DescribeRouteTables"",
            ""ec2:DescribeSecurityGroups"",
            ""ec2:DescribeSpotInstanceRequests"",
            ""ec2:DescribeSpotPriceHistory"",
            ""ec2:DescribeSubnets"",
            ""ec2:DescribeVpcAttribute"",
            ""ec2:DescribeVpcEndpoints"",
            ""ec2:DescribeVpcEndpointServices"",
            ""ec2:DescribeVpcs"",
            ""ec2:DetachNetworkInterface"",
            ""ec2:ModifyImageAttribute"",
            ""ec2:ModifyInstanceAttribute"",
            ""ec2:RequestSpotInstances"",
            ""ec2:RevokeSecurityGroupEgress"",
            ""ec2:RunInstances"",
            ""ec2:TerminateInstances"",
            ""ec2:DeleteVolume"",
            ""ec2:DescribeVolumeStatus"",
            ""ec2:DescribeVolumes"",
            ""ec2:DetachVolume"",
            ""iam:GetRole"",
            ""iam:GetRolePolicy"",
            ""iam:ListInstanceProfiles"",
            ""iam:ListRolePolicies"",
            ""iam:PassRole"",
            ""s3:CreateBucket"",
            ""s3:Get*"",
            ""s3:List*"",
            ""sdb:BatchPutAttributes"",
            ""sdb:Select"",
            ""sqs:CreateQueue"",
            ""sqs:Delete*"",
            ""sqs:GetQueue*"",
            ""sqs:PurgeQueue"",
            ""sqs:ReceiveMessage""
        ]
    }]
}
",
        });
        var iamEmrProfilePolicy = new Aws.Iam.RolePolicy("iamEmrProfilePolicy", new Aws.Iam.RolePolicyArgs
        {
            Role = iamEmrProfileRole.Id,
            Policy = @"{
    ""Version"": ""2012-10-17"",
    ""Statement"": [{
        ""Effect"": ""Allow"",
        ""Resource"": ""*"",
        ""Action"": [
            ""cloudwatch:*"",
            ""dynamodb:*"",
            ""ec2:Describe*"",
            ""elasticmapreduce:Describe*"",
            ""elasticmapreduce:ListBootstrapActions"",
            ""elasticmapreduce:ListClusters"",
            ""elasticmapreduce:ListInstanceGroups"",
            ""elasticmapreduce:ListInstances"",
            ""elasticmapreduce:ListSteps"",
            ""kinesis:CreateStream"",
            ""kinesis:DeleteStream"",
            ""kinesis:DescribeStream"",
            ""kinesis:GetRecords"",
            ""kinesis:GetShardIterator"",
            ""kinesis:MergeShards"",
            ""kinesis:PutRecord"",
            ""kinesis:SplitShard"",
            ""rds:Describe*"",
            ""s3:*"",
            ""sdb:*"",
            ""sns:*"",
            ""sqs:*""
        ]
    }]
}
",
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mainVpc, err := ec2.NewVpc(ctx, "mainVpc", &ec2.VpcArgs{
			CidrBlock:          pulumi.String("168.31.0.0/16"),
			EnableDnsHostnames: pulumi.Bool(true),
			Tags: pulumi.StringMap{
				"name": pulumi.String("emr_test"),
			},
		})
		if err != nil {
			return err
		}
		mainSubnet, err := ec2.NewSubnet(ctx, "mainSubnet", &ec2.SubnetArgs{
			VpcId:     mainVpc.ID(),
			CidrBlock: pulumi.String("168.31.0.0/20"),
			Tags: pulumi.StringMap{
				"name": pulumi.String("emr_test"),
			},
		})
		if err != nil {
			return err
		}
		allowAccess, err := ec2.NewSecurityGroup(ctx, "allowAccess", &ec2.SecurityGroupArgs{
			Description: pulumi.String("Allow inbound traffic"),
			VpcId:       mainVpc.ID(),
			Ingress: ec2.SecurityGroupIngressArray{
				&ec2.SecurityGroupIngressArgs{
					FromPort: pulumi.Int(0),
					ToPort:   pulumi.Int(0),
					Protocol: pulumi.String("-1"),
					CidrBlocks: pulumi.StringArray{
						mainVpc.CidrBlock,
					},
				},
			},
			Egress: ec2.SecurityGroupEgressArray{
				&ec2.SecurityGroupEgressArgs{
					FromPort: pulumi.Int(0),
					ToPort:   pulumi.Int(0),
					Protocol: pulumi.String("-1"),
					CidrBlocks: pulumi.StringArray{
						pulumi.String("0.0.0.0/0"),
					},
				},
			},
			Tags: pulumi.StringMap{
				"name": pulumi.String("emr_test"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			mainSubnet,
		}))
		if err != nil {
			return err
		}
		iamEmrServiceRole, err := iam.NewRole(ctx, "iamEmrServiceRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.Any(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "  \"Version\": \"2008-10-17\",\n", "  \"Statement\": [\n", "    {\n", "      \"Sid\": \"\",\n", "      \"Effect\": \"Allow\",\n", "      \"Principal\": {\n", "        \"Service\": \"elasticmapreduce.amazonaws.com\"\n", "      },\n", "      \"Action\": \"sts:AssumeRole\"\n", "    }\n", "  ]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		iamEmrProfileRole, err := iam.NewRole(ctx, "iamEmrProfileRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.Any(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "  \"Version\": \"2008-10-17\",\n", "  \"Statement\": [\n", "    {\n", "      \"Sid\": \"\",\n", "      \"Effect\": \"Allow\",\n", "      \"Principal\": {\n", "        \"Service\": \"ec2.amazonaws.com\"\n", "      },\n", "      \"Action\": \"sts:AssumeRole\"\n", "    }\n", "  ]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		emrProfile, err := iam.NewInstanceProfile(ctx, "emrProfile", &iam.InstanceProfileArgs{
			Role: iamEmrProfileRole.Name,
		})
		if err != nil {
			return err
		}
		_, err = emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
			ReleaseLabel: pulumi.String("emr-4.6.0"),
			Applications: pulumi.StringArray{
				pulumi.String("Spark"),
			},
			Ec2Attributes: &emr.ClusterEc2AttributesArgs{
				SubnetId:                      mainSubnet.ID(),
				EmrManagedMasterSecurityGroup: allowAccess.ID(),
				EmrManagedSlaveSecurityGroup:  allowAccess.ID(),
				InstanceProfile:               emrProfile.Arn,
			},
			MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
				InstanceType: pulumi.String("m5.xlarge"),
			},
			CoreInstanceGroup: &emr.ClusterCoreInstanceGroupArgs{
				InstanceCount: pulumi.Int(1),
				InstanceType:  pulumi.String("m5.xlarge"),
			},
			Tags: pulumi.StringMap{
				"role":     pulumi.String("rolename"),
				"dns_zone": pulumi.String("env_zone"),
				"env":      pulumi.String("env"),
				"name":     pulumi.String("name-env"),
			},
			BootstrapActions: emr.ClusterBootstrapActionArray{
				&emr.ClusterBootstrapActionArgs{
					Path: pulumi.String("s3://elasticmapreduce/bootstrap-actions/run-if"),
					Name: pulumi.String("runif"),
					Args: pulumi.StringArray{
						pulumi.String("instance.isMaster=true"),
						pulumi.String("echo running on master node"),
					},
				},
			},
			ConfigurationsJson: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "  [\n", "    {\n", "      \"Classification\": \"hadoop-env\",\n", "      \"Configurations\": [\n", "        {\n", "          \"Classification\": \"export\",\n", "          \"Properties\": {\n", "            \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n", "          }\n", "        }\n", "      ],\n", "      \"Properties\": {}\n", "    },\n", "    {\n", "      \"Classification\": \"spark-env\",\n", "      \"Configurations\": [\n", "        {\n", "          \"Classification\": \"export\",\n", "          \"Properties\": {\n", "            \"JAVA_HOME\": \"/usr/lib/jvm/java-1.8.0\"\n", "          }\n", "        }\n", "      ],\n", "      \"Properties\": {}\n", "    }\n", "  ]\n")),
			ServiceRole:        iamEmrServiceRole.Arn,
		})
		if err != nil {
			return err
		}
		gw, err := ec2.NewInternetGateway(ctx, "gw", &ec2.InternetGatewayArgs{
			VpcId: mainVpc.ID(),
		})
		if err != nil {
			return err
		}
		routeTable, err := ec2.NewRouteTable(ctx, "routeTable", &ec2.RouteTableArgs{
			VpcId: mainVpc.ID(),
			Routes: ec2.RouteTableRouteArray{
				&ec2.RouteTableRouteArgs{
					CidrBlock: pulumi.String("0.0.0.0/0"),
					GatewayId: gw.ID(),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewMainRouteTableAssociation(ctx, "mainRouteTableAssociation", &ec2.MainRouteTableAssociationArgs{
			VpcId:        mainVpc.ID(),
			RouteTableId: routeTable.ID(),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "iamEmrServicePolicy", &iam.RolePolicyArgs{
			Role:   iamEmrServiceRole.ID(),
			Policy: pulumi.Any(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\": \"2012-10-17\",\n", "    \"Statement\": [{\n", "        \"Effect\": \"Allow\",\n", "        \"Resource\": \"*\",\n", "        \"Action\": [\n", "            \"ec2:AuthorizeSecurityGroupEgress\",\n", "            \"ec2:AuthorizeSecurityGroupIngress\",\n", "            \"ec2:CancelSpotInstanceRequests\",\n", "            \"ec2:CreateNetworkInterface\",\n", "            \"ec2:CreateSecurityGroup\",\n", "            \"ec2:CreateTags\",\n", "            \"ec2:DeleteNetworkInterface\",\n", "            \"ec2:DeleteSecurityGroup\",\n", "            \"ec2:DeleteTags\",\n", "            \"ec2:DescribeAvailabilityZones\",\n", "            \"ec2:DescribeAccountAttributes\",\n", "            \"ec2:DescribeDhcpOptions\",\n", "            \"ec2:DescribeInstanceStatus\",\n", "            \"ec2:DescribeInstances\",\n", "            \"ec2:DescribeKeyPairs\",\n", "            \"ec2:DescribeNetworkAcls\",\n", "            \"ec2:DescribeNetworkInterfaces\",\n", "            \"ec2:DescribePrefixLists\",\n", "            \"ec2:DescribeRouteTables\",\n", "            \"ec2:DescribeSecurityGroups\",\n", "            \"ec2:DescribeSpotInstanceRequests\",\n", "            \"ec2:DescribeSpotPriceHistory\",\n", "            \"ec2:DescribeSubnets\",\n", "            \"ec2:DescribeVpcAttribute\",\n", "            \"ec2:DescribeVpcEndpoints\",\n", "            \"ec2:DescribeVpcEndpointServices\",\n", "            \"ec2:DescribeVpcs\",\n", "            \"ec2:DetachNetworkInterface\",\n", "            \"ec2:ModifyImageAttribute\",\n", "            \"ec2:ModifyInstanceAttribute\",\n", "            \"ec2:RequestSpotInstances\",\n", "            \"ec2:RevokeSecurityGroupEgress\",\n", "            \"ec2:RunInstances\",\n", "            \"ec2:TerminateInstances\",\n", "            \"ec2:DeleteVolume\",\n", "            \"ec2:DescribeVolumeStatus\",\n", "            \"ec2:DescribeVolumes\",\n", "            \"ec2:DetachVolume\",\n", "            \"iam:GetRole\",\n", "            \"iam:GetRolePolicy\",\n", "            \"iam:ListInstanceProfiles\",\n", "            \"iam:ListRolePolicies\",\n", "            \"iam:PassRole\",\n", "            \"s3:CreateBucket\",\n", "            \"s3:Get*\",\n", "            \"s3:List*\",\n", "            \"sdb:BatchPutAttributes\",\n", "            \"sdb:Select\",\n", "            \"sqs:CreateQueue\",\n", "            \"sqs:Delete*\",\n", "            \"sqs:GetQueue*\",\n", "            \"sqs:PurgeQueue\",\n", "            \"sqs:ReceiveMessage\"\n", "        ]\n", "    }]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "iamEmrProfilePolicy", &iam.RolePolicyArgs{
			Role:   iamEmrProfileRole.ID(),
			Policy: pulumi.Any(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\": \"2012-10-17\",\n", "    \"Statement\": [{\n", "        \"Effect\": \"Allow\",\n", "        \"Resource\": \"*\",\n", "        \"Action\": [\n", "            \"cloudwatch:*\",\n", "            \"dynamodb:*\",\n", "            \"ec2:Describe*\",\n", "            \"elasticmapreduce:Describe*\",\n", "            \"elasticmapreduce:ListBootstrapActions\",\n", "            \"elasticmapreduce:ListClusters\",\n", "            \"elasticmapreduce:ListInstanceGroups\",\n", "            \"elasticmapreduce:ListInstances\",\n", "            \"elasticmapreduce:ListSteps\",\n", "            \"kinesis:CreateStream\",\n", "            \"kinesis:DeleteStream\",\n", "            \"kinesis:DescribeStream\",\n", "            \"kinesis:GetRecords\",\n", "            \"kinesis:GetShardIterator\",\n", "            \"kinesis:MergeShards\",\n", "            \"kinesis:PutRecord\",\n", "            \"kinesis:SplitShard\",\n", "            \"rds:Describe*\",\n", "            \"s3:*\",\n", "            \"sdb:*\",\n", "            \"sns:*\",\n", "            \"sqs:*\"\n", "        ]\n", "    }]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var mainVpc = new Vpc("mainVpc", VpcArgs.builder()        
            .cidrBlock("168.31.0.0/16")
            .enableDnsHostnames(true)
            .tags(Map.of("name", "emr_test"))
            .build());

        var mainSubnet = new Subnet("mainSubnet", SubnetArgs.builder()        
            .vpcId(mainVpc.getId())
            .cidrBlock("168.31.0.0/20")
            .tags(Map.of("name", "emr_test"))
            .build());

        var allowAccess = new SecurityGroup("allowAccess", SecurityGroupArgs.builder()        
            .description("Allow inbound traffic")
            .vpcId(mainVpc.getId())
            .ingress(SecurityGroupIngress.builder()
                .fromPort(0)
                .toPort(0)
                .protocol("-1")
                .cidrBlocks(mainVpc.getCidrBlock())
                .build())
            .egress(SecurityGroupEgress.builder()
                .fromPort(0)
                .toPort(0)
                .protocol("-1")
                .cidrBlocks("0.0.0.0/0")
                .build())
            .tags(Map.of("name", "emr_test"))
            .build());

        var iamEmrServiceRole = new Role("iamEmrServiceRole", RoleArgs.builder()        
            .assumeRolePolicy("""
{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "elasticmapreduce.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
            """)
            .build());

        var iamEmrProfileRole = new Role("iamEmrProfileRole", RoleArgs.builder()        
            .assumeRolePolicy("""
{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "ec2.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
            """)
            .build());

        var emrProfile = new InstanceProfile("emrProfile", InstanceProfileArgs.builder()        
            .role(iamEmrProfileRole.getName())
            .build());

        var cluster = new Cluster("cluster", ClusterArgs.builder()        
            .releaseLabel("emr-4.6.0")
            .applications("Spark")
            .ec2Attributes(ClusterEc2Attributes.builder()
                .subnetId(mainSubnet.getId())
                .emrManagedMasterSecurityGroup(allowAccess.getId())
                .emrManagedSlaveSecurityGroup(allowAccess.getId())
                .instanceProfile(emrProfile.getArn())
                .build())
            .masterInstanceGroup(ClusterMasterInstanceGroup.builder()
                .instanceType("m5.xlarge")
                .build())
            .coreInstanceGroup(ClusterCoreInstanceGroup.builder()
                .instanceCount(1)
                .instanceType("m5.xlarge")
                .build())
            .tags(Map.ofEntries(
                Map.entry("role", "rolename"),
                Map.entry("dns_zone", "env_zone"),
                Map.entry("env", "env"),
                Map.entry("name", "name-env")
            ))
            .bootstrapActions(ClusterBootstrapAction.builder()
                .path("s3://elasticmapreduce/bootstrap-actions/run-if")
                .name("runif")
                .args(                
                    "instance.isMaster=true",
                    "echo running on master node")
                .build())
            .configurationsJson("""
  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
            """)
            .serviceRole(iamEmrServiceRole.getArn())
            .build());

        var gw = new InternetGateway("gw", InternetGatewayArgs.builder()        
            .vpcId(mainVpc.getId())
            .build());

        var routeTable = new RouteTable("routeTable", RouteTableArgs.builder()        
            .vpcId(mainVpc.getId())
            .routes(RouteTableRoute.builder()
                .cidrBlock("0.0.0.0/0")
                .gatewayId(gw.getId())
                .build())
            .build());

        var mainRouteTableAssociation = new MainRouteTableAssociation("mainRouteTableAssociation", MainRouteTableAssociationArgs.builder()        
            .vpcId(mainVpc.getId())
            .routeTableId(routeTable.getId())
            .build());

        var iamEmrServicePolicy = new RolePolicy("iamEmrServicePolicy", RolePolicyArgs.builder()        
            .role(iamEmrServiceRole.getId())
            .policy("""
{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "ec2:AuthorizeSecurityGroupEgress",
            "ec2:AuthorizeSecurityGroupIngress",
            "ec2:CancelSpotInstanceRequests",
            "ec2:CreateNetworkInterface",
            "ec2:CreateSecurityGroup",
            "ec2:CreateTags",
            "ec2:DeleteNetworkInterface",
            "ec2:DeleteSecurityGroup",
            "ec2:DeleteTags",
            "ec2:DescribeAvailabilityZones",
            "ec2:DescribeAccountAttributes",
            "ec2:DescribeDhcpOptions",
            "ec2:DescribeInstanceStatus",
            "ec2:DescribeInstances",
            "ec2:DescribeKeyPairs",
            "ec2:DescribeNetworkAcls",
            "ec2:DescribeNetworkInterfaces",
            "ec2:DescribePrefixLists",
            "ec2:DescribeRouteTables",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeSpotInstanceRequests",
            "ec2:DescribeSpotPriceHistory",
            "ec2:DescribeSubnets",
            "ec2:DescribeVpcAttribute",
            "ec2:DescribeVpcEndpoints",
            "ec2:DescribeVpcEndpointServices",
            "ec2:DescribeVpcs",
            "ec2:DetachNetworkInterface",
            "ec2:ModifyImageAttribute",
            "ec2:ModifyInstanceAttribute",
            "ec2:RequestSpotInstances",
            "ec2:RevokeSecurityGroupEgress",
            "ec2:RunInstances",
            "ec2:TerminateInstances",
            "ec2:DeleteVolume",
            "ec2:DescribeVolumeStatus",
            "ec2:DescribeVolumes",
            "ec2:DetachVolume",
            "iam:GetRole",
            "iam:GetRolePolicy",
            "iam:ListInstanceProfiles",
            "iam:ListRolePolicies",
            "iam:PassRole",
            "s3:CreateBucket",
            "s3:Get*",
            "s3:List*",
            "sdb:BatchPutAttributes",
            "sdb:Select",
            "sqs:CreateQueue",
            "sqs:Delete*",
            "sqs:GetQueue*",
            "sqs:PurgeQueue",
            "sqs:ReceiveMessage"
        ]
    }]
}
            """)
            .build());

        var iamEmrProfilePolicy = new RolePolicy("iamEmrProfilePolicy", RolePolicyArgs.builder()        
            .role(iamEmrProfileRole.getId())
            .policy("""
{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "cloudwatch:*",
            "dynamodb:*",
            "ec2:Describe*",
            "elasticmapreduce:Describe*",
            "elasticmapreduce:ListBootstrapActions",
            "elasticmapreduce:ListClusters",
            "elasticmapreduce:ListInstanceGroups",
            "elasticmapreduce:ListInstances",
            "elasticmapreduce:ListSteps",
            "kinesis:CreateStream",
            "kinesis:DeleteStream",
            "kinesis:DescribeStream",
            "kinesis:GetRecords",
            "kinesis:GetShardIterator",
            "kinesis:MergeShards",
            "kinesis:PutRecord",
            "kinesis:SplitShard",
            "rds:Describe*",
            "s3:*",
            "sdb:*",
            "sns:*",
            "sqs:*"
        ]
    }]
}
            """)
            .build());

        }
}
import pulumi
import pulumi_aws as aws

main_vpc = aws.ec2.Vpc("mainVpc",
    cidr_block="168.31.0.0/16",
    enable_dns_hostnames=True,
    tags={
        "name": "emr_test",
    })
main_subnet = aws.ec2.Subnet("mainSubnet",
    vpc_id=main_vpc.id,
    cidr_block="168.31.0.0/20",
    tags={
        "name": "emr_test",
    })
allow_access = aws.ec2.SecurityGroup("allowAccess",
    description="Allow inbound traffic",
    vpc_id=main_vpc.id,
    ingress=[aws.ec2.SecurityGroupIngressArgs(
        from_port=0,
        to_port=0,
        protocol="-1",
        cidr_blocks=[main_vpc.cidr_block],
    )],
    egress=[aws.ec2.SecurityGroupEgressArgs(
        from_port=0,
        to_port=0,
        protocol="-1",
        cidr_blocks=["0.0.0.0/0"],
    )],
    tags={
        "name": "emr_test",
    },
    opts=pulumi.ResourceOptions(depends_on=[main_subnet]))
# IAM role for EMR Service
iam_emr_service_role = aws.iam.Role("iamEmrServiceRole", assume_role_policy="""{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "elasticmapreduce.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
""")
# IAM Role for EC2 Instance Profile
iam_emr_profile_role = aws.iam.Role("iamEmrProfileRole", assume_role_policy="""{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "ec2.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
""")
emr_profile = aws.iam.InstanceProfile("emrProfile", role=iam_emr_profile_role.name)
cluster = aws.emr.Cluster("cluster",
    release_label="emr-4.6.0",
    applications=["Spark"],
    ec2_attributes=aws.emr.ClusterEc2AttributesArgs(
        subnet_id=main_subnet.id,
        emr_managed_master_security_group=allow_access.id,
        emr_managed_slave_security_group=allow_access.id,
        instance_profile=emr_profile.arn,
    ),
    master_instance_group=aws.emr.ClusterMasterInstanceGroupArgs(
        instance_type="m5.xlarge",
    ),
    core_instance_group=aws.emr.ClusterCoreInstanceGroupArgs(
        instance_count=1,
        instance_type="m5.xlarge",
    ),
    tags={
        "role": "rolename",
        "dns_zone": "env_zone",
        "env": "env",
        "name": "name-env",
    },
    bootstrap_actions=[aws.emr.ClusterBootstrapActionArgs(
        path="s3://elasticmapreduce/bootstrap-actions/run-if",
        name="runif",
        args=[
            "instance.isMaster=true",
            "echo running on master node",
        ],
    )],
    configurations_json="""  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
""",
    service_role=iam_emr_service_role.arn)
gw = aws.ec2.InternetGateway("gw", vpc_id=main_vpc.id)
route_table = aws.ec2.RouteTable("routeTable",
    vpc_id=main_vpc.id,
    routes=[aws.ec2.RouteTableRouteArgs(
        cidr_block="0.0.0.0/0",
        gateway_id=gw.id,
    )])
main_route_table_association = aws.ec2.MainRouteTableAssociation("mainRouteTableAssociation",
    vpc_id=main_vpc.id,
    route_table_id=route_table.id)
###
iam_emr_service_policy = aws.iam.RolePolicy("iamEmrServicePolicy",
    role=iam_emr_service_role.id,
    policy="""{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "ec2:AuthorizeSecurityGroupEgress",
            "ec2:AuthorizeSecurityGroupIngress",
            "ec2:CancelSpotInstanceRequests",
            "ec2:CreateNetworkInterface",
            "ec2:CreateSecurityGroup",
            "ec2:CreateTags",
            "ec2:DeleteNetworkInterface",
            "ec2:DeleteSecurityGroup",
            "ec2:DeleteTags",
            "ec2:DescribeAvailabilityZones",
            "ec2:DescribeAccountAttributes",
            "ec2:DescribeDhcpOptions",
            "ec2:DescribeInstanceStatus",
            "ec2:DescribeInstances",
            "ec2:DescribeKeyPairs",
            "ec2:DescribeNetworkAcls",
            "ec2:DescribeNetworkInterfaces",
            "ec2:DescribePrefixLists",
            "ec2:DescribeRouteTables",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeSpotInstanceRequests",
            "ec2:DescribeSpotPriceHistory",
            "ec2:DescribeSubnets",
            "ec2:DescribeVpcAttribute",
            "ec2:DescribeVpcEndpoints",
            "ec2:DescribeVpcEndpointServices",
            "ec2:DescribeVpcs",
            "ec2:DetachNetworkInterface",
            "ec2:ModifyImageAttribute",
            "ec2:ModifyInstanceAttribute",
            "ec2:RequestSpotInstances",
            "ec2:RevokeSecurityGroupEgress",
            "ec2:RunInstances",
            "ec2:TerminateInstances",
            "ec2:DeleteVolume",
            "ec2:DescribeVolumeStatus",
            "ec2:DescribeVolumes",
            "ec2:DetachVolume",
            "iam:GetRole",
            "iam:GetRolePolicy",
            "iam:ListInstanceProfiles",
            "iam:ListRolePolicies",
            "iam:PassRole",
            "s3:CreateBucket",
            "s3:Get*",
            "s3:List*",
            "sdb:BatchPutAttributes",
            "sdb:Select",
            "sqs:CreateQueue",
            "sqs:Delete*",
            "sqs:GetQueue*",
            "sqs:PurgeQueue",
            "sqs:ReceiveMessage"
        ]
    }]
}
""")
iam_emr_profile_policy = aws.iam.RolePolicy("iamEmrProfilePolicy",
    role=iam_emr_profile_role.id,
    policy="""{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "cloudwatch:*",
            "dynamodb:*",
            "ec2:Describe*",
            "elasticmapreduce:Describe*",
            "elasticmapreduce:ListBootstrapActions",
            "elasticmapreduce:ListClusters",
            "elasticmapreduce:ListInstanceGroups",
            "elasticmapreduce:ListInstances",
            "elasticmapreduce:ListSteps",
            "kinesis:CreateStream",
            "kinesis:DeleteStream",
            "kinesis:DescribeStream",
            "kinesis:GetRecords",
            "kinesis:GetShardIterator",
            "kinesis:MergeShards",
            "kinesis:PutRecord",
            "kinesis:SplitShard",
            "rds:Describe*",
            "s3:*",
            "sdb:*",
            "sns:*",
            "sqs:*"
        ]
    }]
}
""")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const mainVpc = new aws.ec2.Vpc("mainVpc", {
    cidrBlock: "168.31.0.0/16",
    enableDnsHostnames: true,
    tags: {
        name: "emr_test",
    },
});
const mainSubnet = new aws.ec2.Subnet("mainSubnet", {
    vpcId: mainVpc.id,
    cidrBlock: "168.31.0.0/20",
    tags: {
        name: "emr_test",
    },
});
const allowAccess = new aws.ec2.SecurityGroup("allowAccess", {
    description: "Allow inbound traffic",
    vpcId: mainVpc.id,
    ingress: [{
        fromPort: 0,
        toPort: 0,
        protocol: "-1",
        cidrBlocks: [mainVpc.cidrBlock],
    }],
    egress: [{
        fromPort: 0,
        toPort: 0,
        protocol: "-1",
        cidrBlocks: ["0.0.0.0/0"],
    }],
    tags: {
        name: "emr_test",
    },
}, {
    dependsOn: [mainSubnet],
});
// IAM role for EMR Service
const iamEmrServiceRole = new aws.iam.Role("iamEmrServiceRole", {assumeRolePolicy: `{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "elasticmapreduce.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
`});
// IAM Role for EC2 Instance Profile
const iamEmrProfileRole = new aws.iam.Role("iamEmrProfileRole", {assumeRolePolicy: `{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "ec2.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
`});
const emrProfile = new aws.iam.InstanceProfile("emrProfile", {role: iamEmrProfileRole.name});
const cluster = new aws.emr.Cluster("cluster", {
    releaseLabel: "emr-4.6.0",
    applications: ["Spark"],
    ec2Attributes: {
        subnetId: mainSubnet.id,
        emrManagedMasterSecurityGroup: allowAccess.id,
        emrManagedSlaveSecurityGroup: allowAccess.id,
        instanceProfile: emrProfile.arn,
    },
    masterInstanceGroup: {
        instanceType: "m5.xlarge",
    },
    coreInstanceGroup: {
        instanceCount: 1,
        instanceType: "m5.xlarge",
    },
    tags: {
        role: "rolename",
        dns_zone: "env_zone",
        env: "env",
        name: "name-env",
    },
    bootstrapActions: [{
        path: "s3://elasticmapreduce/bootstrap-actions/run-if",
        name: "runif",
        args: [
            "instance.isMaster=true",
            "echo running on master node",
        ],
    }],
    configurationsJson: `  [
    {
      "Classification": "hadoop-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    },
    {
      "Classification": "spark-env",
      "Configurations": [
        {
          "Classification": "export",
          "Properties": {
            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
          }
        }
      ],
      "Properties": {}
    }
  ]
`,
    serviceRole: iamEmrServiceRole.arn,
});
const gw = new aws.ec2.InternetGateway("gw", {vpcId: mainVpc.id});
const routeTable = new aws.ec2.RouteTable("routeTable", {
    vpcId: mainVpc.id,
    routes: [{
        cidrBlock: "0.0.0.0/0",
        gatewayId: gw.id,
    }],
});
const mainRouteTableAssociation = new aws.ec2.MainRouteTableAssociation("mainRouteTableAssociation", {
    vpcId: mainVpc.id,
    routeTableId: routeTable.id,
});
//##
const iamEmrServicePolicy = new aws.iam.RolePolicy("iamEmrServicePolicy", {
    role: iamEmrServiceRole.id,
    policy: `{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "ec2:AuthorizeSecurityGroupEgress",
            "ec2:AuthorizeSecurityGroupIngress",
            "ec2:CancelSpotInstanceRequests",
            "ec2:CreateNetworkInterface",
            "ec2:CreateSecurityGroup",
            "ec2:CreateTags",
            "ec2:DeleteNetworkInterface",
            "ec2:DeleteSecurityGroup",
            "ec2:DeleteTags",
            "ec2:DescribeAvailabilityZones",
            "ec2:DescribeAccountAttributes",
            "ec2:DescribeDhcpOptions",
            "ec2:DescribeInstanceStatus",
            "ec2:DescribeInstances",
            "ec2:DescribeKeyPairs",
            "ec2:DescribeNetworkAcls",
            "ec2:DescribeNetworkInterfaces",
            "ec2:DescribePrefixLists",
            "ec2:DescribeRouteTables",
            "ec2:DescribeSecurityGroups",
            "ec2:DescribeSpotInstanceRequests",
            "ec2:DescribeSpotPriceHistory",
            "ec2:DescribeSubnets",
            "ec2:DescribeVpcAttribute",
            "ec2:DescribeVpcEndpoints",
            "ec2:DescribeVpcEndpointServices",
            "ec2:DescribeVpcs",
            "ec2:DetachNetworkInterface",
            "ec2:ModifyImageAttribute",
            "ec2:ModifyInstanceAttribute",
            "ec2:RequestSpotInstances",
            "ec2:RevokeSecurityGroupEgress",
            "ec2:RunInstances",
            "ec2:TerminateInstances",
            "ec2:DeleteVolume",
            "ec2:DescribeVolumeStatus",
            "ec2:DescribeVolumes",
            "ec2:DetachVolume",
            "iam:GetRole",
            "iam:GetRolePolicy",
            "iam:ListInstanceProfiles",
            "iam:ListRolePolicies",
            "iam:PassRole",
            "s3:CreateBucket",
            "s3:Get*",
            "s3:List*",
            "sdb:BatchPutAttributes",
            "sdb:Select",
            "sqs:CreateQueue",
            "sqs:Delete*",
            "sqs:GetQueue*",
            "sqs:PurgeQueue",
            "sqs:ReceiveMessage"
        ]
    }]
}
`,
});
const iamEmrProfilePolicy = new aws.iam.RolePolicy("iamEmrProfilePolicy", {
    role: iamEmrProfileRole.id,
    policy: `{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Resource": "*",
        "Action": [
            "cloudwatch:*",
            "dynamodb:*",
            "ec2:Describe*",
            "elasticmapreduce:Describe*",
            "elasticmapreduce:ListBootstrapActions",
            "elasticmapreduce:ListClusters",
            "elasticmapreduce:ListInstanceGroups",
            "elasticmapreduce:ListInstances",
            "elasticmapreduce:ListSteps",
            "kinesis:CreateStream",
            "kinesis:DeleteStream",
            "kinesis:DescribeStream",
            "kinesis:GetRecords",
            "kinesis:GetShardIterator",
            "kinesis:MergeShards",
            "kinesis:PutRecord",
            "kinesis:SplitShard",
            "rds:Describe*",
            "s3:*",
            "sdb:*",
            "sns:*",
            "sqs:*"
        ]
    }]
}
`,
});
resources:
  cluster:
    type: aws:emr:Cluster
    properties:
      releaseLabel: emr-4.6.0
      applications:
        - Spark
      ec2Attributes:
        subnetId: ${mainSubnet.id}
        emrManagedMasterSecurityGroup: ${allowAccess.id}
        emrManagedSlaveSecurityGroup: ${allowAccess.id}
        instanceProfile: ${emrProfile.arn}
      masterInstanceGroup:
        instanceType: m5.xlarge
      coreInstanceGroup:
        instanceCount: 1
        instanceType: m5.xlarge
      tags:
        role: rolename
        dns_zone: env_zone
        env: env
        name: name-env
      bootstrapActions:
        - path: s3://elasticmapreduce/bootstrap-actions/run-if
          name: runif
          args:
            - instance.isMaster=true
            - echo running on master node
      configurationsJson: |2
          [
            {
              "Classification": "hadoop-env",
              "Configurations": [
                {
                  "Classification": "export",
                  "Properties": {
                    "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
                  }
                }
              ],
              "Properties": {}
            },
            {
              "Classification": "spark-env",
              "Configurations": [
                {
                  "Classification": "export",
                  "Properties": {
                    "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
                  }
                }
              ],
              "Properties": {}
            }
          ]
      serviceRole: ${iamEmrServiceRole.arn}
  allowAccess:
    type: aws:ec2:SecurityGroup
    properties:
      description: Allow inbound traffic
      vpcId: ${mainVpc.id}
      ingress:
        - fromPort: 0
          toPort: 0
          protocol: -1
          cidrBlocks:
            - ${mainVpc.cidrBlock}
      egress:
        - fromPort: 0
          toPort: 0
          protocol: -1
          cidrBlocks:
            - 0.0.0.0/0
      tags:
        name: emr_test
    options:
      dependson:
        - ${mainSubnet}
  mainVpc:
    type: aws:ec2:Vpc
    properties:
      cidrBlock: 168.31.0.0/16
      enableDnsHostnames: true
      tags:
        name: emr_test
  mainSubnet:
    type: aws:ec2:Subnet
    properties:
      vpcId: ${mainVpc.id}
      cidrBlock: 168.31.0.0/20
      tags:
        name: emr_test
  gw:
    type: aws:ec2:InternetGateway
    properties:
      vpcId: ${mainVpc.id}
  routeTable:
    type: aws:ec2:RouteTable
    properties:
      vpcId: ${mainVpc.id}
      routes:
        - cidrBlock: 0.0.0.0/0
          gatewayId: ${gw.id}
  mainRouteTableAssociation:
    type: aws:ec2:MainRouteTableAssociation
    properties:
      vpcId: ${mainVpc.id}
      routeTableId: ${routeTable.id}
  iamEmrServiceRole:
    type: aws:iam:Role
    properties:
      assumeRolePolicy: |
        {
          "Version": "2008-10-17",
          "Statement": [
            {
              "Sid": "",
              "Effect": "Allow",
              "Principal": {
                "Service": "elasticmapreduce.amazonaws.com"
              },
              "Action": "sts:AssumeRole"
            }
          ]
        }        
  iamEmrServicePolicy:
    type: aws:iam:RolePolicy
    properties:
      role: ${iamEmrServiceRole.id}
      policy: |
        {
            "Version": "2012-10-17",
            "Statement": [{
                "Effect": "Allow",
                "Resource": "*",
                "Action": [
                    "ec2:AuthorizeSecurityGroupEgress",
                    "ec2:AuthorizeSecurityGroupIngress",
                    "ec2:CancelSpotInstanceRequests",
                    "ec2:CreateNetworkInterface",
                    "ec2:CreateSecurityGroup",
                    "ec2:CreateTags",
                    "ec2:DeleteNetworkInterface",
                    "ec2:DeleteSecurityGroup",
                    "ec2:DeleteTags",
                    "ec2:DescribeAvailabilityZones",
                    "ec2:DescribeAccountAttributes",
                    "ec2:DescribeDhcpOptions",
                    "ec2:DescribeInstanceStatus",
                    "ec2:DescribeInstances",
                    "ec2:DescribeKeyPairs",
                    "ec2:DescribeNetworkAcls",
                    "ec2:DescribeNetworkInterfaces",
                    "ec2:DescribePrefixLists",
                    "ec2:DescribeRouteTables",
                    "ec2:DescribeSecurityGroups",
                    "ec2:DescribeSpotInstanceRequests",
                    "ec2:DescribeSpotPriceHistory",
                    "ec2:DescribeSubnets",
                    "ec2:DescribeVpcAttribute",
                    "ec2:DescribeVpcEndpoints",
                    "ec2:DescribeVpcEndpointServices",
                    "ec2:DescribeVpcs",
                    "ec2:DetachNetworkInterface",
                    "ec2:ModifyImageAttribute",
                    "ec2:ModifyInstanceAttribute",
                    "ec2:RequestSpotInstances",
                    "ec2:RevokeSecurityGroupEgress",
                    "ec2:RunInstances",
                    "ec2:TerminateInstances",
                    "ec2:DeleteVolume",
                    "ec2:DescribeVolumeStatus",
                    "ec2:DescribeVolumes",
                    "ec2:DetachVolume",
                    "iam:GetRole",
                    "iam:GetRolePolicy",
                    "iam:ListInstanceProfiles",
                    "iam:ListRolePolicies",
                    "iam:PassRole",
                    "s3:CreateBucket",
                    "s3:Get*",
                    "s3:List*",
                    "sdb:BatchPutAttributes",
                    "sdb:Select",
                    "sqs:CreateQueue",
                    "sqs:Delete*",
                    "sqs:GetQueue*",
                    "sqs:PurgeQueue",
                    "sqs:ReceiveMessage"
                ]
            }]
        }        
  iamEmrProfileRole:
    type: aws:iam:Role
    properties:
      assumeRolePolicy: |
        {
          "Version": "2008-10-17",
          "Statement": [
            {
              "Sid": "",
              "Effect": "Allow",
              "Principal": {
                "Service": "ec2.amazonaws.com"
              },
              "Action": "sts:AssumeRole"
            }
          ]
        }        
  emrProfile:
    type: aws:iam:InstanceProfile
    properties:
      role: ${iamEmrProfileRole.name}
  iamEmrProfilePolicy:
    type: aws:iam:RolePolicy
    properties:
      role: ${iamEmrProfileRole.id}
      policy: |
        {
            "Version": "2012-10-17",
            "Statement": [{
                "Effect": "Allow",
                "Resource": "*",
                "Action": [
                    "cloudwatch:*",
                    "dynamodb:*",
                    "ec2:Describe*",
                    "elasticmapreduce:Describe*",
                    "elasticmapreduce:ListBootstrapActions",
                    "elasticmapreduce:ListClusters",
                    "elasticmapreduce:ListInstanceGroups",
                    "elasticmapreduce:ListInstances",
                    "elasticmapreduce:ListSteps",
                    "kinesis:CreateStream",
                    "kinesis:DeleteStream",
                    "kinesis:DescribeStream",
                    "kinesis:GetRecords",
                    "kinesis:GetShardIterator",
                    "kinesis:MergeShards",
                    "kinesis:PutRecord",
                    "kinesis:SplitShard",
                    "rds:Describe*",
                    "s3:*",
                    "sdb:*",
                    "sns:*",
                    "sqs:*"
                ]
            }]
        }        

Create a Cluster Resource

new Cluster(name: string, args: ClusterArgs, opts?: CustomResourceOptions);
@overload
def Cluster(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            additional_info: Optional[str] = None,
            applications: Optional[Sequence[str]] = None,
            auto_termination_policy: Optional[ClusterAutoTerminationPolicyArgs] = None,
            autoscaling_role: Optional[str] = None,
            bootstrap_actions: Optional[Sequence[ClusterBootstrapActionArgs]] = None,
            configurations: Optional[str] = None,
            configurations_json: Optional[str] = None,
            core_instance_fleet: Optional[ClusterCoreInstanceFleetArgs] = None,
            core_instance_group: Optional[ClusterCoreInstanceGroupArgs] = None,
            custom_ami_id: Optional[str] = None,
            ebs_root_volume_size: Optional[int] = None,
            ec2_attributes: Optional[ClusterEc2AttributesArgs] = None,
            keep_job_flow_alive_when_no_steps: Optional[bool] = None,
            kerberos_attributes: Optional[ClusterKerberosAttributesArgs] = None,
            log_encryption_kms_key_id: Optional[str] = None,
            log_uri: Optional[str] = None,
            master_instance_fleet: Optional[ClusterMasterInstanceFleetArgs] = None,
            master_instance_group: Optional[ClusterMasterInstanceGroupArgs] = None,
            name: Optional[str] = None,
            release_label: Optional[str] = None,
            scale_down_behavior: Optional[str] = None,
            security_configuration: Optional[str] = None,
            service_role: Optional[str] = None,
            step_concurrency_level: Optional[int] = None,
            steps: Optional[Sequence[ClusterStepArgs]] = None,
            tags: Optional[Mapping[str, str]] = None,
            termination_protection: Optional[bool] = None,
            visible_to_all_users: Optional[bool] = None)
@overload
def Cluster(resource_name: str,
            args: ClusterArgs,
            opts: Optional[ResourceOptions] = None)
func NewCluster(ctx *Context, name string, args ClusterArgs, opts ...ResourceOption) (*Cluster, error)
public Cluster(string name, ClusterArgs args, CustomResourceOptions? opts = null)
public Cluster(String name, ClusterArgs args)
public Cluster(String name, ClusterArgs args, CustomResourceOptions options)
type: aws:emr:Cluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Cluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Cluster resource accepts the following input properties:

ReleaseLabel string

Release label for the Amazon EMR release.

ServiceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

AdditionalInfo string
Applications List<string>

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

AutoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

AutoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

BootstrapActions List<ClusterBootstrapActionArgs>

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

Configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ConfigurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

CoreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

CoreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

CustomAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

EbsRootVolumeSize int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

Ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

KeepJobFlowAliveWhenNoSteps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

KerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

LogEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

LogUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

MasterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

MasterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

Name string

Name of the step.

ScaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

SecurityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

StepConcurrencyLevel int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

Steps List<ClusterStepArgs>

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

Tags Dictionary<string, string>

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TerminationProtection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

VisibleToAllUsers bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

ReleaseLabel string

Release label for the Amazon EMR release.

ServiceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

AdditionalInfo string
Applications []string

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

AutoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

AutoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

BootstrapActions []ClusterBootstrapActionArgs

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

Configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ConfigurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

CoreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

CoreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

CustomAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

EbsRootVolumeSize int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

Ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

KeepJobFlowAliveWhenNoSteps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

KerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

LogEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

LogUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

MasterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

MasterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

Name string

Name of the step.

ScaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

SecurityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

StepConcurrencyLevel int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

Steps []ClusterStepArgs

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

Tags map[string]string

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TerminationProtection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

VisibleToAllUsers bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

releaseLabel String

Release label for the Amazon EMR release.

serviceRole String

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

additionalInfo String
applications List

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

autoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole String

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions ListBootstrapActionArgs>

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

configurations String

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson String

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

customAmiId String

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize Integer

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps Boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId String

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri String

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

name String

Name of the step.

scaleDownBehavior String

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration String

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

stepConcurrencyLevel Integer

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps ListStepArgs>

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Map

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

terminationProtection Boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers Boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

releaseLabel string

Release label for the Amazon EMR release.

serviceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

additionalInfo string
applications string[]

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

autoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions ClusterBootstrapActionArgs[]

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

customAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize number

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

name string

Name of the step.

scaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

stepConcurrencyLevel number

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps ClusterStepArgs[]

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags {[key: string]: string}

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

terminationProtection boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

release_label str

Release label for the Amazon EMR release.

service_role str

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

additional_info str
applications Sequence[str]

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

auto_termination_policy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscaling_role str

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrap_actions Sequence[ClusterBootstrapActionArgs]

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

configurations str

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurations_json str

JSON string for supplying list of configurations for the EMR cluster.

core_instance_fleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

core_instance_group ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

custom_ami_id str

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebs_root_volume_size int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2_attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keep_job_flow_alive_when_no_steps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberos_attributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

log_encryption_kms_key_id str

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

log_uri str

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

master_instance_fleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

master_instance_group ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

name str

Name of the step.

scale_down_behavior str

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

security_configuration str

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

step_concurrency_level int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps Sequence[ClusterStepArgs]

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Mapping[str, str]

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

termination_protection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visible_to_all_users bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

releaseLabel String

Release label for the Amazon EMR release.

serviceRole String

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

additionalInfo String
applications List

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

autoTerminationPolicy Property Map

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole String

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions List

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

configurations String

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson String

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet Property Map

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup Property Map

Configuration block to use an Instance Group for the core node type.

customAmiId String

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize Number

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes Property Map

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps Boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes Property Map

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId String

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri String

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet Property Map

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup Property Map

Configuration block to use an Instance Group for the master node type.

name String

Name of the step.

scaleDownBehavior String

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration String

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

stepConcurrencyLevel Number

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps List

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Map

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

terminationProtection Boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers Boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

Outputs

All input properties are implicitly available as output properties. Additionally, the Cluster resource produces the following output properties:

Arn string
Id string

The provider-assigned unique ID for this managed resource.

MasterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

State string
TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string
ClusterState string
Id string

The provider-assigned unique ID for this managed resource.

MasterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String
clusterState String
id String

The provider-assigned unique ID for this managed resource.

masterPublicDns String

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

tagsAll Map

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string
clusterState string
id string

The provider-assigned unique ID for this managed resource.

masterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str
cluster_state str
id str

The provider-assigned unique ID for this managed resource.

master_public_dns str

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String
clusterState String
id String

The provider-assigned unique ID for this managed resource.

masterPublicDns String

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

tagsAll Map

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up an Existing Cluster Resource

Get an existing Cluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ClusterState, opts?: CustomResourceOptions): Cluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        additional_info: Optional[str] = None,
        applications: Optional[Sequence[str]] = None,
        arn: Optional[str] = None,
        auto_termination_policy: Optional[ClusterAutoTerminationPolicyArgs] = None,
        autoscaling_role: Optional[str] = None,
        bootstrap_actions: Optional[Sequence[ClusterBootstrapActionArgs]] = None,
        cluster_state: Optional[str] = None,
        configurations: Optional[str] = None,
        configurations_json: Optional[str] = None,
        core_instance_fleet: Optional[ClusterCoreInstanceFleetArgs] = None,
        core_instance_group: Optional[ClusterCoreInstanceGroupArgs] = None,
        custom_ami_id: Optional[str] = None,
        ebs_root_volume_size: Optional[int] = None,
        ec2_attributes: Optional[ClusterEc2AttributesArgs] = None,
        keep_job_flow_alive_when_no_steps: Optional[bool] = None,
        kerberos_attributes: Optional[ClusterKerberosAttributesArgs] = None,
        log_encryption_kms_key_id: Optional[str] = None,
        log_uri: Optional[str] = None,
        master_instance_fleet: Optional[ClusterMasterInstanceFleetArgs] = None,
        master_instance_group: Optional[ClusterMasterInstanceGroupArgs] = None,
        master_public_dns: Optional[str] = None,
        name: Optional[str] = None,
        release_label: Optional[str] = None,
        scale_down_behavior: Optional[str] = None,
        security_configuration: Optional[str] = None,
        service_role: Optional[str] = None,
        step_concurrency_level: Optional[int] = None,
        steps: Optional[Sequence[ClusterStepArgs]] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        termination_protection: Optional[bool] = None,
        visible_to_all_users: Optional[bool] = None) -> Cluster
func GetCluster(ctx *Context, name string, id IDInput, state *ClusterState, opts ...ResourceOption) (*Cluster, error)
public static Cluster Get(string name, Input<string> id, ClusterState? state, CustomResourceOptions? opts = null)
public static Cluster get(String name, Output<String> id, ClusterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AdditionalInfo string
Applications List<string>

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

Arn string
AutoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

AutoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

BootstrapActions List<ClusterBootstrapActionArgs>

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

Configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ConfigurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

CoreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

CoreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

CustomAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

EbsRootVolumeSize int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

Ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

KeepJobFlowAliveWhenNoSteps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

KerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

LogEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

LogUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

MasterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

MasterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

MasterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

Name string

Name of the step.

ReleaseLabel string

Release label for the Amazon EMR release.

ScaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

SecurityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

ServiceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

State string
StepConcurrencyLevel int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

Steps List<ClusterStepArgs>

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

Tags Dictionary<string, string>

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

TerminationProtection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

VisibleToAllUsers bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

AdditionalInfo string
Applications []string

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

Arn string
AutoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

AutoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

BootstrapActions []ClusterBootstrapActionArgs

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

ClusterState string
Configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ConfigurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

CoreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

CoreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

CustomAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

EbsRootVolumeSize int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

Ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

KeepJobFlowAliveWhenNoSteps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

KerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

LogEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

LogUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

MasterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

MasterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

MasterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

Name string

Name of the step.

ReleaseLabel string

Release label for the Amazon EMR release.

ScaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

SecurityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

ServiceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

StepConcurrencyLevel int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

Steps []ClusterStepArgs

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

Tags map[string]string

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

TerminationProtection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

VisibleToAllUsers bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

additionalInfo String
applications List

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

arn String
autoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole String

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions ListBootstrapActionArgs>

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

clusterState String
configurations String

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson String

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

customAmiId String

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize Integer

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps Boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId String

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri String

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

masterPublicDns String

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

name String

Name of the step.

releaseLabel String

Release label for the Amazon EMR release.

scaleDownBehavior String

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration String

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

serviceRole String

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

stepConcurrencyLevel Integer

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps ListStepArgs>

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Map

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

terminationProtection Boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers Boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

additionalInfo string
applications string[]

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

arn string
autoTerminationPolicy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole string

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions ClusterBootstrapActionArgs[]

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

clusterState string
configurations string

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson string

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

customAmiId string

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize number

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId string

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri string

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

masterPublicDns string

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

name string

Name of the step.

releaseLabel string

Release label for the Amazon EMR release.

scaleDownBehavior string

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration string

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

serviceRole string

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

stepConcurrencyLevel number

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps ClusterStepArgs[]

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags {[key: string]: string}

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

terminationProtection boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

additional_info str
applications Sequence[str]

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

arn str
auto_termination_policy ClusterAutoTerminationPolicyArgs

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscaling_role str

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrap_actions Sequence[ClusterBootstrapActionArgs]

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

cluster_state str
configurations str

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurations_json str

JSON string for supplying list of configurations for the EMR cluster.

core_instance_fleet ClusterCoreInstanceFleetArgs

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

core_instance_group ClusterCoreInstanceGroupArgs

Configuration block to use an Instance Group for the core node type.

custom_ami_id str

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebs_root_volume_size int

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2_attributes ClusterEc2AttributesArgs

Attributes for the EC2 instances running the job flow. See below.

keep_job_flow_alive_when_no_steps bool

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberos_attributes ClusterKerberosAttributesArgs

Kerberos configuration for the cluster. See below.

log_encryption_kms_key_id str

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

log_uri str

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

master_instance_fleet ClusterMasterInstanceFleetArgs

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

master_instance_group ClusterMasterInstanceGroupArgs

Configuration block to use an Instance Group for the master node type.

master_public_dns str

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

name str

Name of the step.

release_label str

Release label for the Amazon EMR release.

scale_down_behavior str

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

security_configuration str

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

service_role str

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

step_concurrency_level int

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps Sequence[ClusterStepArgs]

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Mapping[str, str]

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

termination_protection bool

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visible_to_all_users bool

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

additionalInfo String
applications List

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

arn String
autoTerminationPolicy Property Map

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.

autoscalingRole String

IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

bootstrapActions List

Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.

clusterState String
configurations String

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

configurationsJson String

JSON string for supplying list of configurations for the EMR cluster.

coreInstanceFleet Property Map

Configuration block to use an Instance Fleet for the core node type. Cannot be specified if any core_instance_group configuration blocks are set. Detailed below.

coreInstanceGroup Property Map

Configuration block to use an Instance Group for the core node type.

customAmiId String

Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.

ebsRootVolumeSize Number

Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

ec2Attributes Property Map

Attributes for the EC2 instances running the job flow. See below.

keepJobFlowAliveWhenNoSteps Boolean

Switch on/off run cluster with no steps or when all steps are complete (default is on)

kerberosAttributes Property Map

Kerberos configuration for the cluster. See below.

logEncryptionKmsKeyId String

AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

logUri String

S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.

masterInstanceFleet Property Map

Configuration block to use an Instance Fleet for the master node type. Cannot be specified if any master_instance_group configuration blocks are set. Detailed below.

masterInstanceGroup Property Map

Configuration block to use an Instance Group for the master node type.

masterPublicDns String

The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

name String

Name of the step.

releaseLabel String

Release label for the Amazon EMR release.

scaleDownBehavior String

Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

securityConfiguration String

Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with release_label 4.8.0 or greater.

serviceRole String

IAM role that will be assumed by the Amazon EMR service to access AWS resources.

stepConcurrencyLevel Number

Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with release_label 5.28.0 or greater (default is 1).

steps List

List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with ignoreChanges if other steps are being managed outside of this provider.

tags Map

list of tags to apply to the EMR Cluster. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

terminationProtection Boolean

Switch on/off termination protection (default is false, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to false.

visibleToAllUsers Boolean

Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is true.

Supporting Types

ClusterAutoTerminationPolicy

IdleTimeout int

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

IdleTimeout int

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

idleTimeout Integer

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

idleTimeout number

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

idle_timeout int

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

idleTimeout Number

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

ClusterBootstrapAction

Name string

Name of the step.

Path string

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

Args List<string>

List of command line arguments passed to the JAR file's main function when executed.

Name string

Name of the step.

Path string

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

Args []string

List of command line arguments passed to the JAR file's main function when executed.

name String

Name of the step.

path String

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

args List

List of command line arguments passed to the JAR file's main function when executed.

name string

Name of the step.

path string

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

args string[]

List of command line arguments passed to the JAR file's main function when executed.

name str

Name of the step.

path str

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

args Sequence[str]

List of command line arguments passed to the JAR file's main function when executed.

name String

Name of the step.

path String

Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

args List

List of command line arguments passed to the JAR file's main function when executed.

ClusterCoreInstanceFleet

Id string

ID of the cluster.

InstanceTypeConfigs List<ClusterCoreInstanceFleetInstanceTypeConfig>

Configuration block for instance fleet.

LaunchSpecifications ClusterCoreInstanceFleetLaunchSpecifications

Configuration block for launch specification.

Name string

Name of the step.

ProvisionedOnDemandCapacity int
ProvisionedSpotCapacity int
TargetOnDemandCapacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

TargetSpotCapacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

Id string

ID of the cluster.

InstanceTypeConfigs []ClusterCoreInstanceFleetInstanceTypeConfig

Configuration block for instance fleet.

LaunchSpecifications ClusterCoreInstanceFleetLaunchSpecifications

Configuration block for launch specification.

Name string

Name of the step.

ProvisionedOnDemandCapacity int
ProvisionedSpotCapacity int
TargetOnDemandCapacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

TargetSpotCapacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id String

ID of the cluster.

instanceTypeConfigs ListCoreInstanceFleetInstanceTypeConfig>

Configuration block for instance fleet.

launchSpecifications ClusterCoreInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name String

Name of the step.

provisionedOnDemandCapacity Integer
provisionedSpotCapacity Integer
targetOnDemandCapacity Integer

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity Integer

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id string

ID of the cluster.

instanceTypeConfigs ClusterCoreInstanceFleetInstanceTypeConfig[]

Configuration block for instance fleet.

launchSpecifications ClusterCoreInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name string

Name of the step.

provisionedOnDemandCapacity number
provisionedSpotCapacity number
targetOnDemandCapacity number

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity number

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id str

ID of the cluster.

instance_type_configs Sequence[ClusterCoreInstanceFleetInstanceTypeConfig]

Configuration block for instance fleet.

launch_specifications ClusterCoreInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name str

Name of the step.

provisioned_on_demand_capacity int
provisioned_spot_capacity int
target_on_demand_capacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

target_spot_capacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id String

ID of the cluster.

instanceTypeConfigs List

Configuration block for instance fleet.

launchSpecifications Property Map

Configuration block for launch specification.

name String

Name of the step.

provisionedOnDemandCapacity Number
provisionedSpotCapacity Number
targetOnDemandCapacity Number

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity Number

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

ClusterCoreInstanceFleetInstanceTypeConfig

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

BidPriceAsPercentageOfOnDemandPrice double

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

Configurations List<ClusterCoreInstanceFleetInstanceTypeConfigConfiguration>

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

EbsConfigs List<ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

WeightedCapacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

BidPriceAsPercentageOfOnDemandPrice float64

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

Configurations []ClusterCoreInstanceFleetInstanceTypeConfigConfiguration

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

EbsConfigs []ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

WeightedCapacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice Double

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations ListCoreInstanceFleetInstanceTypeConfigConfiguration>

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs ListCoreInstanceFleetInstanceTypeConfigEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity Integer

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType string

EC2 instance type for all instances in the instance group.

bidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice number

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations ClusterCoreInstanceFleetInstanceTypeConfigConfiguration[]

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig[]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity number

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instance_type str

EC2 instance type for all instances in the instance group.

bid_price str

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bid_price_as_percentage_of_on_demand_price float

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations Sequence[ClusterCoreInstanceFleetInstanceTypeConfigConfiguration]

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebs_configs Sequence[ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weighted_capacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice Number

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations List

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs List

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity Number

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

ClusterCoreInstanceFleetInstanceTypeConfigConfiguration

Classification string

Classification within a configuration.

Properties Dictionary<string, object>

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

Classification string

Classification within a configuration.

Properties map[string]interface{}

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification String

Classification within a configuration.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification string

Classification within a configuration.

properties {[key: string]: any}

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification str

Classification within a configuration.

properties Mapping[str, Any]

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification String

Classification within a configuration.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

ClusterCoreInstanceFleetInstanceTypeConfigEbsConfig

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Integer

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Integer

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Integer

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size number

Volume size, in gibibytes (GiB).

type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size int

Volume size, in gibibytes (GiB).

type str

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops int

Number of I/O operations per second (IOPS) that the volume supports.

volumes_per_instance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Number

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

ClusterCoreInstanceFleetLaunchSpecifications

OnDemandSpecifications List<ClusterCoreInstanceFleetLaunchSpecificationsOnDemandSpecification>

Configuration block for on demand instances launch specifications.

SpotSpecifications List<ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification>

Configuration block for spot instances launch specifications.

OnDemandSpecifications []ClusterCoreInstanceFleetLaunchSpecificationsOnDemandSpecification

Configuration block for on demand instances launch specifications.

SpotSpecifications []ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification

Configuration block for spot instances launch specifications.

onDemandSpecifications ListCoreInstanceFleetLaunchSpecificationsOnDemandSpecification>

Configuration block for on demand instances launch specifications.

spotSpecifications ListCoreInstanceFleetLaunchSpecificationsSpotSpecification>

Configuration block for spot instances launch specifications.

onDemandSpecifications ClusterCoreInstanceFleetLaunchSpecificationsOnDemandSpecification[]

Configuration block for on demand instances launch specifications.

spotSpecifications ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification[]

Configuration block for spot instances launch specifications.

on_demand_specifications Sequence[ClusterCoreInstanceFleetLaunchSpecificationsOnDemandSpecification]

Configuration block for on demand instances launch specifications.

spot_specifications Sequence[ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification]

Configuration block for spot instances launch specifications.

onDemandSpecifications List

Configuration block for on demand instances launch specifications.

spotSpecifications List

Configuration block for spot instances launch specifications.

ClusterCoreInstanceFleetLaunchSpecificationsOnDemandSpecification

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocation_strategy str

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecification

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

TimeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

TimeoutDurationMinutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

BlockDurationMinutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

TimeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

TimeoutDurationMinutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

BlockDurationMinutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction String

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes Integer

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes Integer

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes number

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes number

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocation_strategy str

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeout_action str

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeout_duration_minutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

block_duration_minutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction String

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes Number

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes Number

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

ClusterCoreInstanceGroup

InstanceType string

EC2 instance type for all instances in the instance group.

AutoscalingPolicy string

String containing the EMR Auto Scaling Policy JSON.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

EbsConfigs List<ClusterCoreInstanceGroupEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

Id string

ID of the cluster.

InstanceCount int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

Name string

Name of the step.

InstanceType string

EC2 instance type for all instances in the instance group.

AutoscalingPolicy string

String containing the EMR Auto Scaling Policy JSON.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

EbsConfigs []ClusterCoreInstanceGroupEbsConfig

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

Id string

ID of the cluster.

InstanceCount int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

Name string

Name of the step.

instanceType String

EC2 instance type for all instances in the instance group.

autoscalingPolicy String

String containing the EMR Auto Scaling Policy JSON.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs ListCoreInstanceGroupEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id String

ID of the cluster.

instanceCount Integer

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name String

Name of the step.

instanceType string

EC2 instance type for all instances in the instance group.

autoscalingPolicy string

String containing the EMR Auto Scaling Policy JSON.

bidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs ClusterCoreInstanceGroupEbsConfig[]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id string

ID of the cluster.

instanceCount number

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name string

Name of the step.

instance_type str

EC2 instance type for all instances in the instance group.

autoscaling_policy str

String containing the EMR Auto Scaling Policy JSON.

bid_price str

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebs_configs Sequence[ClusterCoreInstanceGroupEbsConfig]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id str

ID of the cluster.

instance_count int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name str

Name of the step.

instanceType String

EC2 instance type for all instances in the instance group.

autoscalingPolicy String

String containing the EMR Auto Scaling Policy JSON.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs List

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id String

ID of the cluster.

instanceCount Number

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name String

Name of the step.

ClusterCoreInstanceGroupEbsConfig

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Integer

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Integer

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Integer

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size number

Volume size, in gibibytes (GiB).

type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size int

Volume size, in gibibytes (GiB).

type str

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops int

Number of I/O operations per second (IOPS) that the volume supports.

volumes_per_instance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Number

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

ClusterEc2Attributes

InstanceProfile string

Instance Profile for EC2 instances of the cluster assume this role.

AdditionalMasterSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

AdditionalSlaveSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

EmrManagedMasterSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

EmrManagedSlaveSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

KeyName string

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

ServiceAccessSecurityGroup string

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

SubnetId string

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

SubnetIds List<string>

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

InstanceProfile string

Instance Profile for EC2 instances of the cluster assume this role.

AdditionalMasterSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

AdditionalSlaveSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

EmrManagedMasterSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

EmrManagedSlaveSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

KeyName string

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

ServiceAccessSecurityGroup string

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

SubnetId string

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

SubnetIds []string

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

instanceProfile String

Instance Profile for EC2 instances of the cluster assume this role.

additionalMasterSecurityGroups String

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

additionalSlaveSecurityGroups String

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

emrManagedMasterSecurityGroup String

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

emrManagedSlaveSecurityGroup String

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

keyName String

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

serviceAccessSecurityGroup String

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

subnetId String

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

subnetIds List

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

instanceProfile string

Instance Profile for EC2 instances of the cluster assume this role.

additionalMasterSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

additionalSlaveSecurityGroups string

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

emrManagedMasterSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

emrManagedSlaveSecurityGroup string

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

keyName string

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

serviceAccessSecurityGroup string

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

subnetId string

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

subnetIds string[]

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

instance_profile str

Instance Profile for EC2 instances of the cluster assume this role.

additional_master_security_groups str

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

additional_slave_security_groups str

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

emr_managed_master_security_group str

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

emr_managed_slave_security_group str

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

key_name str

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

service_access_security_group str

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

subnet_id str

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

subnet_ids Sequence[str]

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

instanceProfile String

Instance Profile for EC2 instances of the cluster assume this role.

additionalMasterSecurityGroups String

String containing a comma separated list of additional Amazon EC2 security group IDs for the master node.

additionalSlaveSecurityGroups String

String containing a comma separated list of additional Amazon EC2 security group IDs for the slave nodes as a comma separated string.

emrManagedMasterSecurityGroup String

Identifier of the Amazon EC2 EMR-Managed security group for the master node.

emrManagedSlaveSecurityGroup String

Identifier of the Amazon EC2 EMR-Managed security group for the slave nodes.

keyName String

Amazon EC2 key pair that can be used to ssh to the master node as the user called hadoop.

serviceAccessSecurityGroup String

Identifier of the Amazon EC2 service-access security group - required when the cluster runs on a private subnet.

subnetId String

VPC subnet id where you want the job flow to launch. Cannot specify the cc1.4xlarge instance type for nodes of a job flow launched in an Amazon VPC.

subnetIds List

List of VPC subnet id-s where you want the job flow to launch. Amazon EMR identifies the best Availability Zone to launch instances according to your fleet specifications.

ClusterKerberosAttributes

KdcAdminPassword string

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

Realm string

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

AdDomainJoinPassword string

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

AdDomainJoinUser string

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

CrossRealmTrustPrincipalPassword string

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

KdcAdminPassword string

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

Realm string

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

AdDomainJoinPassword string

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

AdDomainJoinUser string

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

CrossRealmTrustPrincipalPassword string

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

kdcAdminPassword String

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

realm String

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

adDomainJoinPassword String

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

adDomainJoinUser String

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

crossRealmTrustPrincipalPassword String

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

kdcAdminPassword string

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

realm string

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

adDomainJoinPassword string

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

adDomainJoinUser string

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

crossRealmTrustPrincipalPassword string

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

kdc_admin_password str

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

realm str

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

ad_domain_join_password str

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

ad_domain_join_user str

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

cross_realm_trust_principal_password str

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

kdcAdminPassword String

Password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster. This provider cannot perform drift detection of this configuration.

realm String

Name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL

adDomainJoinPassword String

Active Directory password for ad_domain_join_user. This provider cannot perform drift detection of this configuration.

adDomainJoinUser String

Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain. This provider cannot perform drift detection of this configuration.

crossRealmTrustPrincipalPassword String

Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms. This provider cannot perform drift detection of this configuration.

ClusterMasterInstanceFleet

Id string

ID of the cluster.

InstanceTypeConfigs List<ClusterMasterInstanceFleetInstanceTypeConfig>

Configuration block for instance fleet.

LaunchSpecifications ClusterMasterInstanceFleetLaunchSpecifications

Configuration block for launch specification.

Name string

Name of the step.

ProvisionedOnDemandCapacity int
ProvisionedSpotCapacity int
TargetOnDemandCapacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

TargetSpotCapacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

Id string

ID of the cluster.

InstanceTypeConfigs []ClusterMasterInstanceFleetInstanceTypeConfig

Configuration block for instance fleet.

LaunchSpecifications ClusterMasterInstanceFleetLaunchSpecifications

Configuration block for launch specification.

Name string

Name of the step.

ProvisionedOnDemandCapacity int
ProvisionedSpotCapacity int
TargetOnDemandCapacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

TargetSpotCapacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id String

ID of the cluster.

instanceTypeConfigs ListMasterInstanceFleetInstanceTypeConfig>

Configuration block for instance fleet.

launchSpecifications ClusterMasterInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name String

Name of the step.

provisionedOnDemandCapacity Integer
provisionedSpotCapacity Integer
targetOnDemandCapacity Integer

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity Integer

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id string

ID of the cluster.

instanceTypeConfigs ClusterMasterInstanceFleetInstanceTypeConfig[]

Configuration block for instance fleet.

launchSpecifications ClusterMasterInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name string

Name of the step.

provisionedOnDemandCapacity number
provisionedSpotCapacity number
targetOnDemandCapacity number

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity number

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id str

ID of the cluster.

instance_type_configs Sequence[ClusterMasterInstanceFleetInstanceTypeConfig]

Configuration block for instance fleet.

launch_specifications ClusterMasterInstanceFleetLaunchSpecifications

Configuration block for launch specification.

name str

Name of the step.

provisioned_on_demand_capacity int
provisioned_spot_capacity int
target_on_demand_capacity int

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

target_spot_capacity int

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

id String

ID of the cluster.

instanceTypeConfigs List

Configuration block for instance fleet.

launchSpecifications Property Map

Configuration block for launch specification.

name String

Name of the step.

provisionedOnDemandCapacity Number
provisionedSpotCapacity Number
targetOnDemandCapacity Number

Target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision.

targetSpotCapacity Number

Target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision.

ClusterMasterInstanceFleetInstanceTypeConfig

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

BidPriceAsPercentageOfOnDemandPrice double

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

Configurations List<ClusterMasterInstanceFleetInstanceTypeConfigConfiguration>

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

EbsConfigs List<ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

WeightedCapacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

BidPriceAsPercentageOfOnDemandPrice float64

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

Configurations []ClusterMasterInstanceFleetInstanceTypeConfigConfiguration

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

EbsConfigs []ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

WeightedCapacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice Double

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations ListMasterInstanceFleetInstanceTypeConfigConfiguration>

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs ListMasterInstanceFleetInstanceTypeConfigEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity Integer

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType string

EC2 instance type for all instances in the instance group.

bidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice number

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations ClusterMasterInstanceFleetInstanceTypeConfigConfiguration[]

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig[]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity number

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instance_type str

EC2 instance type for all instances in the instance group.

bid_price str

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bid_price_as_percentage_of_on_demand_price float

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations Sequence[ClusterMasterInstanceFleetInstanceTypeConfigConfiguration]

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebs_configs Sequence[ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weighted_capacity int

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

bidPriceAsPercentageOfOnDemandPrice Number

Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by instance_type. Expressed as a number (for example, 20 specifies 20%). If neither bid_price nor bid_price_as_percentage_of_on_demand_price is provided, bid_price_as_percentage_of_on_demand_price defaults to 100%.

configurations List

Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of configuration blocks.

ebsConfigs List

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

weightedCapacity Number

Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in aws.emr.InstanceFleet.

ClusterMasterInstanceFleetInstanceTypeConfigConfiguration

Classification string

Classification within a configuration.

Properties Dictionary<string, object>

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

Classification string

Classification within a configuration.

Properties map[string]interface{}

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification String

Classification within a configuration.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification string

Classification within a configuration.

properties {[key: string]: any}

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification str

Classification within a configuration.

properties Mapping[str, Any]

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

classification String

Classification within a configuration.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Integer

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Integer

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Integer

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size number

Volume size, in gibibytes (GiB).

type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size int

Volume size, in gibibytes (GiB).

type str

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops int

Number of I/O operations per second (IOPS) that the volume supports.

volumes_per_instance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Number

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

ClusterMasterInstanceFleetLaunchSpecifications

OnDemandSpecifications List<ClusterMasterInstanceFleetLaunchSpecificationsOnDemandSpecification>

Configuration block for on demand instances launch specifications.

SpotSpecifications List<ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification>

Configuration block for spot instances launch specifications.

OnDemandSpecifications []ClusterMasterInstanceFleetLaunchSpecificationsOnDemandSpecification

Configuration block for on demand instances launch specifications.

SpotSpecifications []ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification

Configuration block for spot instances launch specifications.

onDemandSpecifications ListMasterInstanceFleetLaunchSpecificationsOnDemandSpecification>

Configuration block for on demand instances launch specifications.

spotSpecifications ListMasterInstanceFleetLaunchSpecificationsSpotSpecification>

Configuration block for spot instances launch specifications.

onDemandSpecifications ClusterMasterInstanceFleetLaunchSpecificationsOnDemandSpecification[]

Configuration block for on demand instances launch specifications.

spotSpecifications ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification[]

Configuration block for spot instances launch specifications.

on_demand_specifications Sequence[ClusterMasterInstanceFleetLaunchSpecificationsOnDemandSpecification]

Configuration block for on demand instances launch specifications.

spot_specifications Sequence[ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification]

Configuration block for spot instances launch specifications.

onDemandSpecifications List

Configuration block for on demand instances launch specifications.

spotSpecifications List

Configuration block for spot instances launch specifications.

ClusterMasterInstanceFleetLaunchSpecificationsOnDemandSpecification

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocation_strategy str

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecification

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

TimeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

TimeoutDurationMinutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

BlockDurationMinutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

AllocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

TimeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

TimeoutDurationMinutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

BlockDurationMinutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction String

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes Integer

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes Integer

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy string

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction string

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes number

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes number

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocation_strategy str

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeout_action str

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeout_duration_minutes int

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

block_duration_minutes int

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

allocationStrategy String

Specifies the strategy to use in launching Spot instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot instance pools with optimal capacity for the number of instances that are launching.

timeoutAction String

Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

timeoutDurationMinutes Number

Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

blockDurationMinutes Number

Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

ClusterMasterInstanceGroup

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

EbsConfigs List<ClusterMasterInstanceGroupEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

Id string

ID of the cluster.

InstanceCount int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

Name string

Name of the step.

InstanceType string

EC2 instance type for all instances in the instance group.

BidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

EbsConfigs []ClusterMasterInstanceGroupEbsConfig

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

Id string

ID of the cluster.

InstanceCount int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

Name string

Name of the step.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs ListMasterInstanceGroupEbsConfig>

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id String

ID of the cluster.

instanceCount Integer

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name String

Name of the step.

instanceType string

EC2 instance type for all instances in the instance group.

bidPrice string

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs ClusterMasterInstanceGroupEbsConfig[]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id string

ID of the cluster.

instanceCount number

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name string

Name of the step.

instance_type str

EC2 instance type for all instances in the instance group.

bid_price str

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebs_configs Sequence[ClusterMasterInstanceGroupEbsConfig]

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id str

ID of the cluster.

instance_count int

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name str

Name of the step.

instanceType String

EC2 instance type for all instances in the instance group.

bidPrice String

Bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.

ebsConfigs List

Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.

id String

ID of the cluster.

instanceCount Number

Target number of instances for the instance group. Must be 1 or 3. Defaults to 1. Launching with multiple master nodes is only supported in EMR version 5.23.0+, and requires this resource's core_instance_group to be configured. Public (Internet accessible) instances must be created in VPC subnets that have map public IP on launch enabled. Termination protection is automatically enabled when launched with multiple master nodes and this provider must have the termination_protection = false configuration applied before destroying this resource.

name String

Name of the step.

ClusterMasterInstanceGroupEbsConfig

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

Size int

Volume size, in gibibytes (GiB).

Type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

Iops int

Number of I/O operations per second (IOPS) that the volume supports.

VolumesPerInstance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Integer

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Integer

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Integer

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size number

Volume size, in gibibytes (GiB).

type string

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size int

Volume size, in gibibytes (GiB).

type str

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops int

Number of I/O operations per second (IOPS) that the volume supports.

volumes_per_instance int

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

size Number

Volume size, in gibibytes (GiB).

type String

Volume type. Valid options are gp2, io1, standard and st1. See EBS Volume Types.

iops Number

Number of I/O operations per second (IOPS) that the volume supports.

volumesPerInstance Number

Number of EBS volumes with this configuration to attach to each EC2 instance in the instance group (default is 1).

ClusterStep

ActionOnFailure string

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

HadoopJarStep ClusterStepHadoopJarStep

JAR file used for the step. See below.

Name string

Name of the step.

ActionOnFailure string

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

HadoopJarStep ClusterStepHadoopJarStep

JAR file used for the step. See below.

Name string

Name of the step.

actionOnFailure String

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

hadoopJarStep ClusterStepHadoopJarStep

JAR file used for the step. See below.

name String

Name of the step.

actionOnFailure string

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

hadoopJarStep ClusterStepHadoopJarStep

JAR file used for the step. See below.

name string

Name of the step.

action_on_failure str

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

hadoop_jar_step ClusterStepHadoopJarStep

JAR file used for the step. See below.

name str

Name of the step.

actionOnFailure String

Action to take if the step fails. Valid values: TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE

hadoopJarStep Property Map

JAR file used for the step. See below.

name String

Name of the step.

ClusterStepHadoopJarStep

Jar string

Path to a JAR file run during the step.

Args List<string>

List of command line arguments passed to the JAR file's main function when executed.

MainClass string

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

Properties Dictionary<string, string>

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

Jar string

Path to a JAR file run during the step.

Args []string

List of command line arguments passed to the JAR file's main function when executed.

MainClass string

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

Properties map[string]string

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

jar String

Path to a JAR file run during the step.

args List

List of command line arguments passed to the JAR file's main function when executed.

mainClass String

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

jar string

Path to a JAR file run during the step.

args string[]

List of command line arguments passed to the JAR file's main function when executed.

mainClass string

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

properties {[key: string]: string}

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

jar str

Path to a JAR file run during the step.

args Sequence[str]

List of command line arguments passed to the JAR file's main function when executed.

main_class str

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

properties Mapping[str, str]

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

jar String

Path to a JAR file run during the step.

args List

List of command line arguments passed to the JAR file's main function when executed.

mainClass String

Name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

properties Map

Key-Value map of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

Import

EMR clusters can be imported using the id, e.g.,

 $ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF

Since the API does not return the actual values for Kerberos configurations, environments with those configurations will need to use the resource options configuration block ignoreChanges argument available to all provider resources to prevent perpetual differences, e.g. terraform resource “aws_emr_cluster” “example” {

… other configuration …

lifecycle {

ignore_changes = [kerberos_attributes]

} }

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.