[{"data":1,"prerenderedAt":31},["ShallowReactive",2],{"snippet-eventbridge-bulk-schedule-creating":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":17,"meta":19,"resources":20,"services":21,"snippets":24,"stem":28,"tags":29,"type":18,"__hash__":30},"snippets\u002Fsnippets\u002Feventbridge-bulk-schedule-creating.json","Bulk Create EventBridge Scheduler Schedules Using AWS CLI",[7],"content\u002Fcontributors\u002Fsahithi-ginjupalli.json","Use AWS CLI to bulk create multiple Amazon EventBridge Scheduler schedules in a loop with dynamic naming and rate expressions targeting AWS Lambda","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Feventbridge-bulk-schedule-creating",{"headline":14,"text":15},"How it works",[16],"This snippet demonstrates how to bulk create multiple Amazon EventBridge Scheduler schedules using the AWS CLI in a shell loop. It uses `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.",[18],"AWS CLI",{},null,[22,23],"eventbridge-scheduler","lambda-event-functions",[25],{"title":26,"language":18,"code":27},"Copy the commands on your CLI and replace the LAMBDA_ARN and the EVENTBRIDGE_ROLE_ARN. Modify the loop count and rate expressions as desired","for i in $(seq 1 5); do\n  aws scheduler create-schedule \\\n    --name \"bulk-schedule-$i\" \\\n    --group-name \"default\" \\\n    --schedule-expression \"rate($((i * 5)) minutes)\" \\\n    --target '{\n      \"Arn\": \"&#60;LAMBDA_ARN&#62;\",\n      \"RoleArn\": \"&#60;EVENTBRIDGE_ROLE_ARN&#62;\"\n    }' \\\n    --flexible-time-window '{\"Mode\": \"OFF\"}' \\\n  && echo \"Created schedule: bulk-schedule-$i\"\ndone","snippets\u002Feventbridge-bulk-schedule-creating",[],"JvSr-JamVWN0DTjGFvEwpYKCCE3vTS3oD7V3047pDak",1792665262977]