Skip to content

StartJobRun

Source: src/AWS/Glue/StartJobRun.ts

Starts a run of a Glue job definition.

Grants glue:StartJobRun and glue:GetJobRun on the bound job. Returns the JobRunId; poll getJobRun for the run’s terminal state (SUCCEEDED, FAILED, TIMEOUT, …).

Provide the StartJobRunHttp implementation layer on the Function effect (.pipe(Effect.provide(AWS.Glue.StartJobRunHttp))), bind the job in the init phase, then start runs at runtime.

// init
const startJobRun = yield* AWS.Glue.StartJobRun(job);
return {
fetch: Effect.gen(function* () {
// runtime
const { JobRunId } = yield* startJobRun({
Arguments: { "--input": "s3://my-bucket/input/" },
});
return HttpServerResponse.json({ JobRunId });
}),
};