AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Invokes the RunJobFlow operation against Amazon Elastic MapReduce.

Syntax

Start-EMRJobFlow
-Name <String>
-LogUri <String>
-AdditionalInfo <String>
-Instances_AdditionalMasterSecurityGroup <String[]>
-Instances_AdditionalSlaveSecurityGroup <String[]>
-AmiVersion <String>
-Application <Application[]>
-AutoScalingRole <String>
-Instances_Placement_AvailabilityZone <String>
-Instances_Placement_AvailabilityZones <String[]>
-BootstrapAction <BootstrapActionConfig[]>
-Configuration <Configuration[]>
-CustomAmiId <String>
-EbsRootVolumeSize <Int32>
-Instances_Ec2KeyName <String>
-Instances_Ec2SubnetId <String>
-Instances_Ec2SubnetIds <String[]>
-Instances_EmrManagedMasterSecurityGroup <String>
-Instances_EmrManagedSlaveSecurityGroup <String>
-Instances_HadoopVersion <String>
-Instances_InstanceCount <Int32>
-Instances_InstanceFleet <InstanceFleetConfig[]>
-Instances_InstanceGroup <InstanceGroupConfig[]>
-JobFlowRole <String>
-Instances_KeepJobFlowAliveWhenNoStep <Boolean>
-Instances_MasterInstanceType <String>
-NewSupportedProduct <SupportedProductConfig[]>
-ReleaseLabel <String>
-RepoUpgradeOnBoot <RepoUpgradeOnBoot>
-ScaleDownBehavior <ScaleDownBehavior>
-SecurityConfiguration <String>
-Instances_ServiceAccessSecurityGroup <String>
-ServiceRole <String>
-Instances_SlaveInstanceType <String>
-Step <StepConfig[]>
-SupportedProduct <String[]>
-Tag <Tag[]>
-Instances_TerminationProtected <Boolean>
-VisibleToAllUser <Boolean>
-Force <SwitchParameter>

Description

RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfigKeepJobFlowAliveWhenNoSteps parameter is set to TRUE, the cluster transitions to the WAITING state rather than shutting down after the steps have completed. For additional protection, you can set the JobFlowInstancesConfigTerminationProtected parameter to TRUE to lock the cluster and prevent it from being terminated by API call, user intervention, or in the event of a job flow error. A maximum of 256 steps are allowed in each job flow. If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide. For long running clusters, we recommend that you periodically store your results. The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.

Parameters

-AdditionalInfo <String>
A JSON string for selecting additional features.
Required?False
Position?Named
Accept pipeline input?False
-AmiVersion <String>
For Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, the Linux AMI is determined by the ReleaseLabel specified or by CustomAmiID. The version of the Amazon Machine Image (AMI) to use when launching Amazon EC2 instances in the job flow. For details about the AMI versions currently supported in EMR version 3.x and 2.x, see AMI Versions Supported in EMR in the Amazon EMR Developer Guide. If the AMI supports multiple versions of Hadoop (for example, AMI 1.0 supports both Hadoop 0.18 and 0.20), you can use the JobFlowInstancesConfigHadoopVersion parameter to modify the version of Hadoop from the defaults shown above.Previously, the EMR AMI version API parameter options allowed you to use latest for the latest AMI version rather than specify a numerical value. Some regions no longer support this deprecated option as they only have a newer release label version of EMR, which requires you to specify an EMR release label release (EMR 4.x or later).
Required?False
Position?Named
Accept pipeline input?False
-Application <Application[]>
For Amazon EMR releases 4.0 and later. A list of applications for the cluster. Valid values are: "Hadoop", "Hive", "Mahout", "Pig", and "Spark." They are case insensitive.
Required?False
Position?Named
Accept pipeline input?False
-AutoScalingRole <String>
An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
Required?False
Position?Named
Accept pipeline input?False
-BootstrapAction <BootstrapActionConfig[]>
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
Required?False
Position?Named
Accept pipeline input?False
-Configuration <Configuration[]>
For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are creating.
Required?False
Position?Named
Accept pipeline input?False
-CustomAmiId <String>
Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about custom AMIs in Amazon EMR, see Using a Custom AMI in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use AmiVersion instead.For information about creating a custom AMI, see Creating an Amazon EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information about finding an AMI ID, see Finding a Linux AMI.
Required?False
Position?Named
Accept pipeline input?False
-EbsRootVolumeSize <Int32>
The 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.
Required?False
Position?Named
Accept pipeline input?False
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-Instances_AdditionalMasterSecurityGroup <String[]>
A list of additional Amazon EC2 security group IDs for the master node.
Required?False
Position?Named
Accept pipeline input?False
-Instances_AdditionalSlaveSecurityGroup <String[]>
A list of additional Amazon EC2 security group IDs for the slave nodes.
Required?False
Position?Named
Accept pipeline input?False
-Instances_Ec2KeyName <String>
The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop."
Required?False
Position?Named
Accept pipeline input?False
-Instances_Ec2SubnetId <String>
Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster launches in the normal Amazon Web Services cloud, outside of an Amazon VPC, if the account launching the cluster supports EC2 Classic networks in the region where the cluster launches.Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for clusters launched in an Amazon VPC.
Required?False
Position?Named
Accept pipeline input?False
-Instances_Ec2SubnetIds <String[]>
Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
Required?False
Position?Named
Accept pipeline input?False
-Instances_EmrManagedMasterSecurityGroup <String>
The identifier of the Amazon EC2 security group for the master node.
Required?False
Position?Named
Accept pipeline input?False
-Instances_EmrManagedSlaveSecurityGroup <String>
The identifier of the Amazon EC2 security group for the slave nodes.
Required?False
Position?Named
Accept pipeline input?False
-Instances_HadoopVersion <String>
The Hadoop version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.
Required?False
Position?Named
Accept pipeline input?False
-Instances_InstanceCount <Int32>
The number of EC2 instances in the cluster.
Required?False
Position?Named
Accept pipeline input?False
-Instances_InstanceFleet <InstanceFleetConfig[]>
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.
Required?False
Position?Named
Accept pipeline input?False
-Instances_InstanceGroup <InstanceGroupConfig[]>
Configuration for the instance groups in a cluster.
Required?False
Position?Named
Accept pipeline input?False
-Instances_KeepJobFlowAliveWhenNoStep <Boolean>
Specifies whether the cluster should remain available after completing all steps.
Required?False
Position?Named
Accept pipeline input?False
-Instances_MasterInstanceType <String>
The EC2 instance type of the master node.
Required?False
Position?Named
Accept pipeline input?False
-Instances_Placement_AvailabilityZone <String>
The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used for uniform instance groups, while AvailabilityZones (plural) is used for instance fleets.
Required?False
Position?Named
Accept pipeline input?False
-Instances_Placement_AvailabilityZones <String[]>
When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups.The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
Required?False
Position?Named
Accept pipeline input?False
-Instances_ServiceAccessSecurityGroup <String>
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
Required?False
Position?Named
Accept pipeline input?False
-Instances_SlaveInstanceType <String>
The EC2 instance type of the slave nodes.
Required?False
Position?Named
Accept pipeline input?False
-Instances_TerminationProtected <Boolean>
Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.
Required?False
Position?Named
Accept pipeline input?False
-JobFlowRole <String>
Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you must have already created it using the CLI or console.
Required?False
Position?Named
Accept pipeline input?False
-LogUri <String>
The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.
Required?False
Position?3
Accept pipeline input?False
-Name <String>
The name of the job flow.
Required?False
Position?1
Accept pipeline input?True (ByValue, )
-NewSupportedProduct <SupportedProductConfig[]>
For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. Supported values are:
  • "mapr-m3" - launch the cluster using MapR M3 Edition.
  • "mapr-m5" - launch the cluster using MapR M5 Edition.
  • "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.
  • "mapr-m7" - launch the cluster using MapR M7 Edition.
  • "hunk" - launch the cluster with the Hunk Big Data Analtics Platform.
  • "hue"- launch the cluster with Hue installed.
  • "spark" - launch the cluster with Apache Spark installed.
  • "ganglia" - launch the cluster with the Ganglia Monitoring System installed.
Required?False
Position?Named
Accept pipeline input?False
-ReleaseLabel <String>
The release label for the Amazon EMR release. For Amazon EMR 3.x and 2.x AMIs, use AmiVersion instead.
Required?False
Position?Named
Accept pipeline input?False
-RepoUpgradeOnBoot <RepoUpgradeOnBoot>
Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is SECURITY, which indicates that only security updates are applied. If NONE is specified, no updates are applied, and all updates must be applied manually.
Required?False
Position?Named
Accept pipeline input?False
-ScaleDownBehavior <ScaleDownBehavior>
Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.
Required?False
Position?Named
Accept pipeline input?False
-SecurityConfiguration <String>
The name of a security configuration to apply to the cluster.
Required?False
Position?Named
Accept pipeline input?False
-ServiceRole <String>
The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.
Required?False
Position?Named
Accept pipeline input?False
-Step <StepConfig[]>
A list of steps to run.
Required?False
Position?Named
Accept pipeline input?False
-SupportedProduct <String[]>
For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.A list of strings that indicates third-party software to use. For more information, see Use Third Party Applications with Amazon EMR. Currently supported values are:
  • "mapr-m3" - launch the job flow using MapR M3 Edition.
  • "mapr-m5" - launch the job flow using MapR M5 Edition.
Required?False
Position?Named
Accept pipeline input?False
-Tag <Tag[]>
A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
Required?False
Position?Named
Accept pipeline input?False
-VisibleToAllUser <Boolean>
Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to false, only the IAM user that created the cluster can view and manage it.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a String object to this cmdlet for the Name parameter.

Outputs

This cmdlet returns a String object. The service call response (type Amazon.ElasticMapReduce.Model.RunJobFlowResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z