Home > Software engineering >  How do I schedule a Lambda function to execute everyday only during specific dates?
How do I schedule a Lambda function to execute everyday only during specific dates?

Time:02-01

Is there a way to schedule my Lambda to run everyday ONLY during specific dates ? Example:

  • everyday between 1-July to 30-July
  • everyday between 1-Oct to 30-Dec

Also, could I use these dates to set the schedule expression with eventbridge - Event bridge Cron expression config

CodePudding user response:

You can set up a rule to run an AWS Lambda function on a schedule. Here is a tutorial that shows how to do it.

At a high level, here are the steps.

  1. Create an AWS Lambda Function
  2. Create a Rule via CloudWatch
  3. Verify the Rule
  • Related