Skip to content

StartJobRun

Source: src/AWS/EMRContainers/StartJobRun.ts

Runtime binding for emr-containers:StartJobRun.

Submits a Spark job run to the bound VirtualCluster. The virtual cluster ID is injected from the binding; pass a jobDriver + executionRoleArn + releaseLabel directly, or a jobTemplateId (+ jobTemplateParameters) to start from a JobTemplate. Returns the new job run’s id/arn for use with DescribeJobRun / CancelJobRun. Provide the implementation with Effect.provide(AWS.EMRContainers.StartJobRunHttp).

// init — bind the operation to the virtual cluster
const startJobRun = yield* AWS.EMRContainers.StartJobRun(virtualCluster);
// runtime
const { id } = yield* startJobRun({
jobTemplateId: templateId,
jobTemplateParameters: { EntryPoint: "s3://my-bucket/etl.py" },
});
yield* Effect.log(`job run started: ${id}`);