-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
When you reference a parameter for 'Enabled' property in ScheduledEvent of 'AWS::Serverless::Function', it is not honoring the parameter value passed and setting the "State": "ENABLED" for Events::Rule in the processed template.
'Enabled' property in ScheduledEvent of 'AWS::Serverless::Function' currently only accepts 'true' or 'false' bool values hard-coded as string in template.
in the background when composing the processed template, 'AWS::Serverless-2016-10-31' transform sees:
- if 'Enabled' property is set in the ScheduledEvent,
- if it is set, 'State' Is set to 'DISABLED' only if the 'Enabled' property is 'False'. If it is anything else, 'State' Is set to 'ENABLED'.
You can reference the transform code here:
https://github.com/awslabs/serverless-application-model/blob/93b6ac0afb6f322e047d6e4c4887f0d829e54b88/samtranslator/model/eventsources/push.py#L113
Currently Serverless transform is not capable of reading the parameter value to set the 'State' of Event::Rule.
Please add support to parse the parameter value and set the 'State' property value to 'DISABLED' /'Enabled' accordingly.
mgorski-mg, bofoy, maclennann, hector-vazquez-clip, jwalsh2me and 19 morediegogurpegui, forzagreen and miarmak-ta