Skip to content

UpdateSchedule

Source: src/AWS/Scheduler/UpdateSchedule.ts

Runtime binding for scheduler:UpdateSchedule.

Pairs with CreateSchedule for the dynamic-scheduling pattern: a deployed Lambda reschedules or pauses schedules it minted at runtime (push a reminder back, disable a recurring job). UpdateSchedule is a full PUT — unspecified fields are reset to their defaults, so send the complete desired configuration.

Like CreateSchedule, the binding is constructed with the schedule execution role and optionally a scoping ScheduleGroup; it contributes both scheduler:UpdateSchedule on the group’s schedule ARN pattern and iam:PassRole on the execution role.

Reschedule A Reminder

const updateSchedule = yield* AWS.Scheduler.UpdateSchedule(role);
// runtime: push the reminder back a day (full PUT — resend the target)
yield* updateSchedule({
Name: `reminder-${userId}`,
ScheduleExpression: "at(2026-01-02T00:00:00)",
ActionAfterCompletion: "DELETE",
Target: {
Arn: yield* queueArn,
Input: JSON.stringify({ userId }),
},
});

Scope Updates To A Schedule Group

const updateSchedule = yield* AWS.Scheduler.UpdateSchedule(role, group);