This CloudFormation template schedules standby worker count changes on a Deadline Cloud fleet based on a time schedule. Standby workers are a warm pool of idle workers that can start processing jobs immediately without waiting for new instances to launch. By scheduling standby workers only during business hours, you reduce job start latency when your team is active while avoiding the cost of idle workers overnight and on weekends.
With the default settings, this template sets the standby worker count to 2 at 8:00 AM UTC Monday through Friday, and resets it to 0 at 5:00 PM UTC.
This template works with any existing Deadline Cloud fleet, whether it was created via the AWS console, CLI, or another CloudFormation template. It supports both service-managed fleets and customer-managed fleets. Use this sample as a starting point and modify it to fit your own scheduling and cost optimization needs.
- Lambda Function: Updates the fleet's standby worker count by calling the Deadline Cloud
UpdateFleetAPI. It reads the fleet's current configuration first to avoid overwriting other settings. - IAM Roles: A Lambda execution role with
deadline:GetFleetanddeadline:UpdateFleetpermissions scoped to the specified fleet, and a scheduler role to invoke the Lambda. - EventBridge Schedules: Schedules that trigger the Lambda at the start and end of business hours.
- An existing Deadline Cloud farm and fleet. The fleet can be service-managed or customer-managed.
- The Farm ID and Fleet ID. You can find these in the
Deadline Cloud console or by using the AWS CLI:
aws deadline list-farms aws deadline list-fleets --farm-id <FARM_ID>
- To schedule a different time window, update the
BusinessHoursStartCronandBusinessHoursEndCronparameters. To run every day (including weekends) from 9 AM to 6 PM Pacific time:BusinessHoursStartCron:cron(0 9 * * ? *)BusinessHoursEndCron:cron(0 18 * * ? *)ScheduleTimezone:US/Pacific
- To schedule multiple fleets, deploy one stack per fleet.
- Download the deadline-cloud-standby-scheduling-template.yaml CloudFormation template.
- From the CloudFormation console, choose Create Stack > With new resources (standard).
- Upload the template file and click Next.
- Enter a stack name (e.g.
StandbyScheduling), your Farm ID, Fleet ID, and adjust the schedule parameters as needed:- BusinessHoursStandbyWorkerCount: Workers to keep warm during business hours (default: 2).
- OffHoursStandbyWorkerCount: Workers to keep warm outside business hours (default: 0).
- BusinessHoursStartCron / BusinessHoursEndCron: Cron expressions for the schedule. Default is weekdays 8 AM to 5 PM. Uses EventBridge Scheduler cron syntax.
- ScheduleTimezone: Timezone for the cron expressions (default: UTC). Accepts any
IANA timezone name such as
US/PacificorEurope/London.
- Click Next, acknowledge IAM resource creation, and create the stack.
aws cloudformation create-stack \
--stack-name StandbyScheduling \
--template-body file://deadline-cloud-standby-scheduling-template.yaml \
--capabilities CAPABILITY_IAM \
--parameters \
ParameterKey=FarmId,ParameterValue=farm-0123456789abcdef0123456789abcdef \
ParameterKey=FleetId,ParameterValue=fleet-0123456789abcdef0123456789abcdefaws cloudformation delete-stack --stack-name StandbySchedulingDeleting the stack removes the Lambda, IAM roles, and schedules. It does not modify your fleet's current standby worker count. The fleet retains whatever value was last set.