Bootstrap FreeKB - Amazon Web Services (AWS) - Schedule reoccurring Lambda Function using EventBridge Scheduler
Amazon Web Services (AWS) - Schedule reoccurring Lambda Function using EventBridge Scheduler

Updated:   |  Amazon Web Services (AWS) articles

EventBridge Scheduler is similar to Linux cron to schedule one time or reoccurring jobs. For example, I have a Lambda Function named temporaryTokens that I want to run once every minute.

  1. In the EventBridge Scheduler console (https://console.aws.amazon.com/scheduler/home/) select Create Schedule.
  2. Give your schedule a name (I named mine temporaryTokens)
  3. I would probably go with the default schedule group at first
  4. Select reoccurring schedule and enter the following so that the schedule runs once every minute:
    1. minute = *
    2. hour = *
    3. day of month = *
    4. month = *
    5. day of the week = ?
    6. year = *
  5. Set Flexible Time Window to None
  6. Select Next
  7. Select AWS Lambda Invoke
  8. Select your Lambda Function (I selected temporaryTokens)
  9. Select Next
  10. I would probably set Action after schedule completion to None
  11. Select Next
  12. Select Create Schedule.

You should see something like this.

 

Then over in CloudWatch, you should see an event for your Lambda Function once every minute.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 003c32 in the box below so that we can be sure you are a human.