
Use AWS CLI to bulk create multiple Amazon EventBridge Scheduler schedules in a loop with dynamic naming and rate expressions targeting AWS Lambda
aws scheduler create-schedule inside a for loop to create multiple schedules with dynamic names and varying rate expressions, all targeting the same AWS Lambda function. This is useful when you need to provision many schedules at once for batch processing, multi-tenant workloads, or automated provisioning scenarios.for i in $(seq 1 5); do
aws scheduler create-schedule \
--name "bulk-schedule-$i" \
--group-name "default" \
--schedule-expression "rate($((i * 5)) minutes)" \
--target '{
"Arn": "<LAMBDA_ARN>",
"RoleArn": "<EVENTBRIDGE_ROLE_ARN>"
}' \
--flexible-time-window '{"Mode": "OFF"}' \
&& echo "Created schedule: bulk-schedule-$i"
done