Skip to content

AWS.Deadline reference

Source: src/AWS/Deadline/Budget.ts

An AWS Deadline Cloud budget — tracks a queue’s approximate render spend over a fixed window and stops scheduling when thresholds are crossed.

Queue Budget with Hard Stop

import * as AWS from "alchemy/AWS";
const budget = yield* AWS.Deadline.Budget("MonthlyBudget", {
farmId: farm.farmId,
queueId: queue.queueId,
approximateDollarLimit: 100,
actions: [
{ type: "STOP_SCHEDULING_AND_COMPLETE_TASKS", thresholdPercentage: 100 },
],
schedule: {
fixed: {
startTime: "2026-01-01T00:00:00Z",
endTime: "2027-01-01T00:00:00Z",
},
},
});

Graduated Thresholds

// Let in-flight tasks finish at 90%, cancel everything at 100%.
const budget = yield* AWS.Deadline.Budget("QueueBudget", {
farmId: farm.farmId,
queueId: queue.queueId,
approximateDollarLimit: 500,
actions: [
{ type: "STOP_SCHEDULING_AND_COMPLETE_TASKS", thresholdPercentage: 90 },
{ type: "STOP_SCHEDULING_AND_CANCEL_TASKS", thresholdPercentage: 100 },
],
schedule: {
fixed: {
startTime: "2026-01-01T00:00:00Z",
endTime: "2026-02-01T00:00:00Z",
},
},
});

Source: src/AWS/Deadline/CreateJob.ts

Runtime binding for deadline:CreateJob.

Submits a render job to the bound Queue — the data-plane entry point of Deadline Cloud. The job template is an Open Job Description (OJD) document (JSON or YAML). The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.CreateJobHttp).

// init — bind the operation to the queue
const createJob = yield* AWS.Deadline.CreateJob(queue);
// runtime
const { jobId } = yield* createJob({
template: JSON.stringify(jobTemplate),
templateType: "JSON",
priority: 50,
});

Source: src/AWS/Deadline/Farm.ts

An AWS Deadline Cloud farm — the top-level container for render-farm queues, fleets, storage profiles, and budgets.

Basic Farm

import * as AWS from "alchemy/AWS";
const farm = yield* AWS.Deadline.Farm("RenderFarm", {});

Farm with Description and Cost Scaling

const farm = yield* AWS.Deadline.Farm("RenderFarm", {
displayName: "studio-renders",
description: "Production render farm",
costScaleFactor: 1.5,
tags: { team: "vfx" },
});

Source: src/AWS/Deadline/Fleet.ts

An AWS Deadline Cloud fleet — a group of workers (customer-managed hosts or service-managed EC2 instances) that run render jobs from associated queues.

Customer-Managed Fleet

import * as AWS from "alchemy/AWS";
const fleet = yield* AWS.Deadline.Fleet("Workers", {
farmId: farm.farmId,
roleArn: fleetRole.roleArn,
maxWorkerCount: 10,
configuration: {
customerManaged: {
mode: "NO_SCALING",
workerCapabilities: {
vCpuCount: { min: 1 },
memoryMiB: { min: 1024 },
osFamily: "LINUX",
cpuArchitectureType: "x86_64",
},
},
},
});

Service-Managed EC2 Fleet

const fleet = yield* AWS.Deadline.Fleet("Workers", {
farmId: farm.farmId,
roleArn: fleetRole.roleArn,
minWorkerCount: 0,
maxWorkerCount: 5,
configuration: {
serviceManagedEc2: {
instanceCapabilities: {
vCpuCount: { min: 2, max: 8 },
memoryMiB: { min: 4096 },
osFamily: "LINUX",
cpuArchitectureType: "x86_64",
},
instanceMarketOptions: { type: "spot" },
},
},
});

Source: src/AWS/Deadline/GetJob.ts

Runtime binding for deadline:GetJob.

Reads a job’s detail in the bound Queue — lifecycle status, task run status counts, priority, timing. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetJobHttp).

// init — bind the operation to the queue
const getJob = yield* AWS.Deadline.GetJob(queue);
// runtime
const job = yield* getJob({ jobId });
if (job.taskRunStatus === "FAILED") {
yield* Effect.logError(job.lifecycleStatusMessage);
}

Source: src/AWS/Deadline/GetSession.ts

Runtime binding for deadline:GetSession.

Reads a worker session’s detail for a job in the bound Queue — lifecycle status, host properties, worker log configuration. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetSessionHttp).

// init — bind the operation to the queue
const getSession = yield* AWS.Deadline.GetSession(queue);
// runtime
const session = yield* getSession({ jobId, sessionId });

Source: src/AWS/Deadline/GetSessionAction.ts

Runtime binding for deadline:GetSessionAction.

Reads one session action’s detail (status, timing, exit code, progress, definition) for a job in the bound Queue. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetSessionActionHttp).

// init — bind the operation to the queue
const getSessionAction = yield* AWS.Deadline.GetSessionAction(queue);
// runtime
const action = yield* getSessionAction({ jobId, sessionActionId });
if (action.processExitCode !== undefined && action.processExitCode !== 0) {
yield* Effect.logError(`action failed: ${action.processExitCode}`);
}

Source: src/AWS/Deadline/GetSessionsStatisticsAggregation.ts

Runtime binding for deadline:GetSessionsStatisticsAggregation.

Fetches the status and results (cost in USD, runtime, per-group stats) of an aggregation started with StartSessionsStatisticsAggregation on the bound Farm. The farm’s farmId is injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetSessionsStatisticsAggregationHttp).

GetSessionsStatisticsAggregation: Usage Statistics

Section titled “GetSessionsStatisticsAggregation: Usage Statistics”
// init — bind the operation to the farm
const getAggregation =
yield* AWS.Deadline.GetSessionsStatisticsAggregation(farm);
// runtime
const result = yield* getAggregation({ aggregationId }).pipe(
Effect.repeat({
schedule: Schedule.spaced("2 seconds"),
until: (r) => r.status !== "IN_PROGRESS",
times: 30,
}),
);

Source: src/AWS/Deadline/GetStep.ts

Runtime binding for deadline:GetStep.

Reads a step’s detail for a job in the bound Queue — lifecycle status, task run status counts, dependency counts, parameter space. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetStepHttp).

// init — bind the operation to the queue
const getStep = yield* AWS.Deadline.GetStep(queue);
// runtime
const step = yield* getStep({ jobId, stepId });

Source: src/AWS/Deadline/GetTask.ts

Runtime binding for deadline:GetTask.

Reads a task’s detail for a step in the bound Queue — run status, parameters, retry count, latest session action. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.GetTaskHttp).

// init — bind the operation to the queue
const getTask = yield* AWS.Deadline.GetTask(queue);
// runtime
const task = yield* getTask({ jobId, stepId, taskId });

Source: src/AWS/Deadline/ListJobParameterDefinitions.ts

Runtime binding for deadline:ListJobParameterDefinitions.

Lists the parameter definitions a job’s Open Job Description template declares (name, type, default, allowed values) for a job in the bound Queue — useful to introspect what a resubmission would accept. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListJobParameterDefinitionsHttp).

ListJobParameterDefinitions: Monitoring Jobs

Section titled “ListJobParameterDefinitions: Monitoring Jobs”
// init — bind the operation to the queue
const listJobParameterDefinitions =
yield* AWS.Deadline.ListJobParameterDefinitions(queue);
// runtime
const { jobParameterDefinitions } =
yield* listJobParameterDefinitions({ jobId });

Source: src/AWS/Deadline/ListJobs.ts

Runtime binding for deadline:ListJobs.

Enumerates the jobs in the bound Queue (paginated). The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListJobsHttp).

// init — bind the operation to the queue
const listJobs = yield* AWS.Deadline.ListJobs(queue);
// runtime
const { jobs } = yield* listJobs();

Source: src/AWS/Deadline/ListSessionActions.ts

Runtime binding for deadline:ListSessionActions.

Lists the session actions (environment enter/exit, task runs, attachment syncs) recorded for a job in the bound Queue, optionally filtered by sessionId or taskId. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListSessionActionsHttp).

// init — bind the operation to the queue
const listSessionActions = yield* AWS.Deadline.ListSessionActions(queue);
// runtime
const { sessionActions } = yield* listSessionActions({ jobId });

Source: src/AWS/Deadline/ListSessions.ts

Runtime binding for deadline:ListSessions.

Enumerates the worker sessions of a job in the bound Queue (paginated). The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListSessionsHttp).

// init — bind the operation to the queue
const listSessions = yield* AWS.Deadline.ListSessions(queue);
// runtime
const { sessions } = yield* listSessions({ jobId });

Source: src/AWS/Deadline/ListSteps.ts

Runtime binding for deadline:ListSteps.

Enumerates the steps of a job in the bound Queue (paginated). The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListStepsHttp).

// init — bind the operation to the queue
const listSteps = yield* AWS.Deadline.ListSteps(queue);
// runtime
const { steps } = yield* listSteps({ jobId });

Source: src/AWS/Deadline/ListTasks.ts

Runtime binding for deadline:ListTasks.

Enumerates the tasks of a step in the bound Queue (paginated). The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.ListTasksHttp).

// init — bind the operation to the queue
const listTasks = yield* AWS.Deadline.ListTasks(queue);
// runtime
const { tasks } = yield* listTasks({ jobId, stepId });

Source: src/AWS/Deadline/Monitor.ts

An AWS Deadline Cloud monitor — the hosted web console where artists and administrators view farms, queues, and jobs, authenticated through IAM Identity Center.

Basic Monitor

import * as AWS from "alchemy/AWS";
const monitor = yield* AWS.Deadline.Monitor("StudioMonitor", {
subdomain: "studio-renders",
identityCenterInstanceArn: "arn:aws:sso:::instance/ssoins-1234567890abcdef",
roleArn: monitorRole.roleArn,
});

Export the Monitor URL

// The monitor's web console URL is available as an output attribute —
// return it from the stack so users know where to sign in.
const monitor = yield* AWS.Deadline.Monitor("StudioMonitor", {
subdomain: "studio-renders",
identityCenterInstanceArn: identityCenterArn,
roleArn: monitorRole.roleArn,
});
return { monitorUrl: monitor.url };

Source: src/AWS/Deadline/Queue.ts

An AWS Deadline Cloud queue — accepts render jobs within a farm and schedules them onto associated fleets.

Basic Queue

import * as AWS from "alchemy/AWS";
const farm = yield* AWS.Deadline.Farm("RenderFarm", {});
const queue = yield* AWS.Deadline.Queue("RenderQueue", {
farmId: farm.farmId,
});

Queue with Job Attachments and Role

const queue = yield* AWS.Deadline.Queue("RenderQueue", {
farmId: farm.farmId,
roleArn: queueRole.roleArn,
defaultBudgetAction: "STOP_SCHEDULING_AND_COMPLETE_TASKS",
jobAttachmentSettings: {
s3BucketName: bucket.bucketName,
rootPrefix: "attachments/",
},
});

Source: src/AWS/Deadline/SearchJobs.ts

Runtime binding for deadline:SearchJobs.

Searches the jobs of the bound Queue with filter and sort expressions (name, status, user, parameters, dates). The queue’s farmId/queueIds: [queueId] are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.SearchJobsHttp).

// init — bind the operation to the queue
const searchJobs = yield* AWS.Deadline.SearchJobs(queue);
// runtime
const { jobs } = yield* searchJobs({
itemOffset: 0,
filterExpressions: {
operator: "AND",
filters: [
{
stringFilter: {
name: "TASK_RUN_STATUS",
operator: "EQUAL",
value: "FAILED",
},
},
],
},
});

Source: src/AWS/Deadline/SearchSteps.ts

Runtime binding for deadline:SearchSteps.

Searches the steps of the bound Queue (optionally narrowed to one jobId) with filter and sort expressions. The queue’s farmId/queueIds: [queueId] are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.SearchStepsHttp).

// init — bind the operation to the queue
const searchSteps = yield* AWS.Deadline.SearchSteps(queue);
// runtime
const { steps } = yield* searchSteps({
itemOffset: 0,
jobId,
filterExpressions: {
operator: "AND",
filters: [
{
stringFilter: {
name: "TASK_RUN_STATUS",
operator: "EQUAL",
value: "FAILED",
},
},
],
},
});

Source: src/AWS/Deadline/SearchTasks.ts

Runtime binding for deadline:SearchTasks.

Searches the tasks of the bound Queue (optionally narrowed to one jobId) with filter and sort expressions. The queue’s farmId/queueIds: [queueId] are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.SearchTasksHttp).

// init — bind the operation to the queue
const searchTasks = yield* AWS.Deadline.SearchTasks(queue);
// runtime
const { tasks, totalResults } = yield* searchTasks({
itemOffset: 0,
jobId,
});

Source: src/AWS/Deadline/StartSessionsStatisticsAggregation.ts

Runtime binding for deadline:StartSessionsStatisticsAggregation.

Starts an asynchronous usage/cost statistics aggregation over the bound Farm’s queues or fleets. Poll the returned aggregationId with GetSessionsStatisticsAggregation for the results. The farm’s farmId is injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.StartSessionsStatisticsAggregationHttp).

StartSessionsStatisticsAggregation: Usage Statistics

Section titled “StartSessionsStatisticsAggregation: Usage Statistics”
// init — bind the operation to the farm
const startAggregation =
yield* AWS.Deadline.StartSessionsStatisticsAggregation(farm);
// runtime
const { aggregationId } = yield* startAggregation({
resourceIds: { queueIds: [queueId] },
startTime: new Date(Date.now() - 24 * 3600 * 1000),
endTime: new Date(),
groupBy: ["QUEUE_ID"],
statistics: ["SUM"],
});

Source: src/AWS/Deadline/StorageProfile.ts

An AWS Deadline Cloud storage profile — describes the operating system and file system locations of the hosts in a farm so path mapping works across mixed environments.

Linux Storage Profile

import * as AWS from "alchemy/AWS";
const profile = yield* AWS.Deadline.StorageProfile("LinuxHosts", {
farmId: farm.farmId,
osFamily: "LINUX",
fileSystemLocations: [
{ name: "Assets", path: "/mnt/assets", type: "SHARED" },
],
});

Cross-Platform Path Mapping

// A second profile in the same farm maps the same shared location to its
// Windows drive path, so jobs submitted from either OS resolve `Assets`.
const windows = yield* AWS.Deadline.StorageProfile("WindowsHosts", {
farmId: farm.farmId,
osFamily: "WINDOWS",
fileSystemLocations: [
{ name: "Assets", path: "Z:\\assets", type: "SHARED" },
],
});

Source: src/AWS/Deadline/UpdateJob.ts

Runtime binding for deadline:UpdateJob.

Mutates a job in the bound Queue — reprioritize, cap failures, or cancel/suspend/requeue it by setting targetTaskRunStatus. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.UpdateJobHttp).

// init — bind the operation to the queue
const updateJob = yield* AWS.Deadline.UpdateJob(queue);
// runtime
yield* updateJob({ jobId, targetTaskRunStatus: "CANCELED" });

Source: src/AWS/Deadline/UpdateStep.ts

Runtime binding for deadline:UpdateStep.

Retargets every task of a step in the bound Queue — requeue (READY), cancel (CANCELED), suspend (SUSPENDED), or force-fail/ succeed the step’s tasks in one call. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.UpdateStepHttp).

// init — bind the operation to the queue
const updateStep = yield* AWS.Deadline.UpdateStep(queue);
// runtime
yield* updateStep({ jobId, stepId, targetTaskRunStatus: "READY" });

Source: src/AWS/Deadline/UpdateTask.ts

Runtime binding for deadline:UpdateTask.

Retargets a single task of a job in the bound Queue — requeue (READY), cancel (CANCELED), suspend (SUSPENDED), or force-fail/ succeed it. The queue’s farmId/queueId are injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.UpdateTaskHttp).

// init — bind the operation to the queue
const updateTask = yield* AWS.Deadline.UpdateTask(queue);
// runtime
yield* updateTask({ jobId, stepId, taskId, targetRunStatus: "CANCELED" });