From 0a642b0946c8350481cab31da19ffab26c45417c Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Mon, 18 May 2026 17:26:19 +0700 Subject: [PATCH] fix(deploy): quote FlexibleTimeWindow.Mode as string (EarlyValidation) YAML 1.1 implicit conversion: bare 'OFF' parses as boolean false. AWS::Scheduler::Schedule.FlexibleTimeWindow.Mode requires the string 'OFF' or 'FLEXIBLE'. CFN's EarlyValidation hook rejects the boolean, causing 'Failed to create changeset' on every deploy attempt. Verified by manual create-change-set against the SAM-packaged template: Mode: false -> FAILED; Mode: "OFF" -> CREATE_COMPLETE with 4 changes (BotFunction modify, LolscheduleDailyPushSchedule add, SchedulerExecutionRole policy modify, MonthlyBudget remove). --- template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.yaml b/template.yaml index 7935e6f..aed85d8 100644 --- a/template.yaml +++ b/template.yaml @@ -221,7 +221,7 @@ Resources: Description: Fires lolschedule daily-push handler at 01:00 UTC (08:00 ICT) ScheduleExpression: "cron(0 1 * * ? *)" ScheduleExpressionTimezone: UTC - FlexibleTimeWindow: { Mode: OFF } + FlexibleTimeWindow: { Mode: "OFF" } # quoted: bare OFF → YAML 1.1 boolean false → EarlyValidation rejects State: ENABLED Target: Arn: !GetAtt BotFunction.Arn