Unfortunately, there is no simple and straightforward solution for this task.
If you try to use the every 10 seconds cron expression 0/10 0 0 ? * * *
, then you get the Parameter ScheduleExpression is not valid
error message.
The only workaround is to create a Step Functions State Machine, that invokes another Lambda to track the current number of iterations, which invokes our original Lambda.
References: