serverless-fargate icon indicating copy to clipboard operation
serverless-fargate copied to clipboard

Enable (true/false) Configuration Option

Open alejandrosaenz117 opened this issue 2 years ago • 1 comments

Serverless for Lambda has a schedule boolean configuration called enabled that when set to true will have the Lambda run on a cron schedule. On the contrary, when set to false it will not not run. We have automation that we needed to temporary disable due to unforeseen external circumstances and we turned off the scheduled task via the console. It would be ideal to do this via a configuration update.

Awesome plugin!

example: enabled: false

alejandrosaenz117 avatar Sep 16 '23 17:09 alejandrosaenz117

This is interesting, I'm unsure if there is a flag which can be set within the AWS::Events::Rule definition to disable the rule? It looks like you have to do an API request. The only thing I think we could poss. do is not create the scheduled rule if it is explicitly not enabled. Alternately we could look at always creating the task AWS::ECS::TaskDefinition regardless of if the service or schedule is specified 🤔

eddmann avatar Jul 12 '24 18:07 eddmann