mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
738 B
738 B
awsCompileScheduledEvents
This plugins compiles the function schedule event to to a CloudFormation resource.
How it works
awsCompileScheduledEvents hooks into the deploy:compileEvents hook.
It loops over all functions which are defined in serverless.yaml. For each function that has a schedule event defined, a CloudWatch schedule event rule will be created with a status of "enabled" and targeting the lambda function the event is defined within.
Furthermore a lambda permission for the current function is created which makes is possible to invoke the function at the specified schedule.
Those two resources are then merged into the serverless.service.resources.aws.Resources section.