Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions eventbridge-schedule-expressions/cron-expression.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
aws scheduler create-schedule \
--name "my-cron-schedule" \
--schedule-expression "cron(0 9 * * ? *)" \
--target '{
"Arn": "<LAMBDA_ARN>",
"RoleArn": "<EVENTBRIDGE_ROLE_ARN>"
}' \
--flexible-time-window '{"Mode": "OFF"}'
8 changes: 8 additions & 0 deletions eventbridge-schedule-expressions/rate-expression.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
aws scheduler create-schedule \
--name "my-rate-schedule" \
--schedule-expression "rate(5 minutes)" \
--target '{
"Arn": "<LAMBDA_ARN>",
"RoleArn": "<EVENTBRIDGE_ROLE_ARN>"
}' \
--flexible-time-window '{"Mode": "OFF"}'
35 changes: 35 additions & 0 deletions eventbridge-schedule-expressions/snippet-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"title": "Create EventBridge Scheduler Schedules Using AWS CLI",
"description": "Use AWS CLI to create Amazon EventBridge Scheduler schedules with rate and cron expressions targeting AWS Lambda",
"type": "AWS CLI",
"services": ["eventbridge-scheduler", "lambda"],
"tags": [],
"languages": ["AWS CLI"],
"introBox": {
"headline": "How it works",
"text": [
"This snippet demonstrates how to create Amazon EventBridge Scheduler schedules using the AWS CLI `aws scheduler create-schedule` command with rate and cron expressions, targeting AWS Lambda"
]
},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-snippets/tree/main/eventbridge-schedule-expressions"
}
},
"snippets": [
{
"title": "Copy the commands on your CLI and replace the LAMBDA_ARN and the EVENTBRIDGE_ROLE_ARN. Modidy the rate/cron expressions as desired",
"snippetPath": ["cron-expression.txt","rate-expression.txt"],
"language": "AWS CLI"
}
],
"authors": [
{
"headline": "Presented by Archana V",
"name": "Archana V",
"image": "https://media.licdn.com/dms/image/v2/D5603AQGhkVtEhllFEw/profile-displayphoto-shrink_400_400/B56ZZH3LL6H0Ag-/0/1744962369913?e=1774483200&v=beta&t=wAhvwq-jEIWnyQwDfIkK_-Sq16Z4RvpjWtYmDkc3eg4",
"bio": "Solutions Architect at AWS",
"linkedin": "archanavenkat"
}
]
}