---
title: "POST /applications/{applicationId}/jobruns"
method: POST
path: "/applications/{applicationId}/jobruns"
---

# POST /applications/{applicationId}/jobruns

`POST /applications/{applicationId}/jobruns`

Starts a job run.

## Path parameters

- `applicationId` string, required

## Request body

- object
  - `clientToken` string, required — The client idempotency token of the job run to start. Its value must be unique for each request.
  - `executionRoleArn` string, required — The execution role ARN for the job run.
  - `executionIamPolicy` object — Optional IAM policy. The resulting job IAM role permissions will be an intersection of the policies passed and the policy associated with your job execution role.
    - `policy` string — An IAM inline policy to use as an execution IAM policy.
    - `policyArns` Arn[] — A list of Amazon Resource Names (ARNs) to use as an execution IAM policy.
  - `jobDriver` object — The driver that the job runs on.
    - `sparkSubmit` object — The job driver parameters specified for Spark.
      - `entryPoint` string, password, required — The entry point for the Spark submit job run.
      - `entryPointArguments` EntryPointArgument[] — The arguments for the Spark submit job run.
      - `sparkSubmitParameters` string, password — The parameters for the Spark submit job run.
    - `hive` object — The job driver parameters specified for Hive.
      - `query` string, password, required — The query for the Hive job run.
      - `initQueryFile` string, password — The query file for the Hive job run.
      - `parameters` string, password — The parameters for the Hive job run.
  - `configurationOverrides` object — A configuration specification to be used to override existing configurations.
    - `applicationConfiguration` Configuration[] — The override configurations for the application.
      - `classification` string, required — The classification within a configuration.
      - `properties` unknown
      - `configurations` Configuration[] — A list of additional configurations to apply within a configuration object.
    - `monitoringConfiguration` object — The override configurations for monitoring.
      - `s3MonitoringConfiguration` object — The Amazon S3 configuration for monitoring log publishing.
        - `logUri` string — The Amazon S3 destination URI for log publishing.
        - `encryptionKeyArn` string — The KMS key ARN to encrypt the logs published to the given Amazon S3 destination.
      - `managedPersistenceMonitoringConfiguration` object — The managed log persistence configuration for a job run.
        - `enabled` boolean — Enables managed logging and defaults to true. If set to false, managed logging will be turned off.
        - `encryptionKeyArn` string — The KMS key ARN to encrypt the logs stored in managed log persistence.
      - `cloudWatchLoggingConfiguration` object — The Amazon CloudWatch configuration for monitoring logs. You can configure your jobs to send log information to CloudWatch.
        - `enabled` boolean, required — Enables CloudWatch logging.
        - `logGroupName` string — The name of the log group in Amazon CloudWatch Logs where you want to publish your logs.
        - `logStreamNamePrefix` string — Prefix for the CloudWatch log stream name.
        - `encryptionKeyArn` string — The Key Management Service (KMS) key ARN to encrypt the logs that you store in CloudWatch Logs.
        - `logTypes` object — <p>The types of logs that you want to publish to CloudWatch. If you don't specify any log types, driver STDOUT and STDERR logs will be published to CloudWatch Logs by default. For more information including the supported worker types for Hive and Spark, see <a href="https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/logging.html#jobs-log-storage-cw">Logging for EMR Serverless with CloudWatch</a>.</p> <ul> <li> <p> <b>Key Valid Values</b>: <code>SPARK_DRIVER</code>, <code>SPARK_EXECUTOR</code>, <code>HIVE_DRIVER</code>, <code>TEZ_TASK</code> </p> </li> <li> <p> <b>Array Members Valid Values</b>: <code>STDOUT</code>, <code>STDERR</code>, <code>HIVE_LOG</code>, <code>TEZ_AM</code>, <code>SYSTEM_LOGS</code> </p> </li> </ul>
      - `prometheusMonitoringConfiguration` object — The monitoring configuration object you can configure to send metrics to Amazon Managed Service for Prometheus for a job run.
        - `remoteWriteUrl` string — The remote write URL in the Amazon Managed Service for Prometheus workspace to send metrics to.
    - `diskEncryptionConfiguration` object — The override configuration to encrypt local disks.
      - `encryptionContext` object — Specifies the optional encryption context that will be used when encrypting the data. An encryption context is a collection of non-secret key-value pairs that represent additional authenticated data.
      - `encryptionKeyArn` string — The KMS key ARN to encrypt local disks.
  - `tags` object — The tags assigned to the job run.
  - `executionTimeoutMinutes` integer — The maximum duration for the job run to run. If the job run runs beyond this duration, it will be automatically cancelled.
  - `name` string — The optional job run name. This doesn't have to be unique.
  - `mode` 'BATCH' | 'STREAMING' — The mode of the job run when it starts.
  - `retryPolicy` object — The retry policy to use for a job run.
    - `maxAttempts` integer — Maximum number of attempts for the job run. This parameter is only applicable for <code>BATCH</code> mode.
    - `maxFailedAttemptsPerHour` integer — Maximum number of failed attempts per hour. This [arameter is only applicable for <code>STREAMING</code> mode.

## Response `200`

Success

- StartJobRunResponse
  - `applicationId` string, required — This output displays the application ID on which the job run was submitted.
  - `jobRunId` string, required — The output contains the ID of the started job run.
  - `arn` string, required — This output displays the ARN of the job run..

## Other responses

- `480` — ValidationException
- `481` — ResourceNotFoundException
- `482` — InternalServerException
- `483` — ConflictException

---

[API](https://skmtc.net/aws/apis/emr-serverless.md) · [All operations](https://skmtc.net/aws/apis/emr-serverless/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/emr-serverless/revisions/d7a4ce0af1b7/schema)
