serverless/docs/plugins/aws/awsCompileScheduledEvents.md
Eslam A. Hefnawy 21adc30ded fix docs
2016-06-10 16:57:48 +02:00

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.