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).
This commit is contained in:
tiennm99 committed 2026-05-18 17:26:19 +07:00
1 parent 78eb493754
commit 0a642b0946
1 file changed
+1 -1
+1 -1
View File
@@ -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