Search code examples
aws-lambdacronamazon-cloudwatchaws-event-bridge

ValidationException: Parameter ScheduleExpression is not valid


My cron syntax is

cron(25 8 10 2 4 2022)

And I wish to run the job exactly once on Thursday February 10 at 8:25 am. But getting the above error when trying to run.


Solution

  • You can schedule lambda event using following syntax:

    # NOTE: This will execute on UTC mode only
    cron(Minutes Hours Day-of-month Month Day-of-week Year)
    

    So your cron expression should look like:

    cron(25 08 10 02 ? 2022)
    

    For more information, here is the official AWS Guide