Nuthin could be easier.
In the serverless.yml
set the triggering event from schedule
.
...
functions:
...
my-scheduled-code:
description: Some test for scheduled run
handler: src/functions/myScheduled.handle
events:
- schedule: rate(1 minute)
...
As for schedule parameter there is two function cron
and rate
.
Links:
https://serverless.com/framework/docs/providers/aws/events/schedule/
https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html