{"id":"c175b9b5-f628-426a-9292-80f083dd5c26","task":"Schedule a one-time and recurring task with EventBridge Scheduler and configure retry and DLQ","domain":"aws-eventbridge","steps":["Create a one-time schedule: aws scheduler create-schedule --name my-one-time --schedule-expression 'at(2026-12-01T09:00:00)' --flexible-time-window '{\"Mode\": \"OFF\"}' --target '{\"Arn\": \"<lambda-arn>\", \"RoleArn\": \"<role-arn>\", \"Input\": \"{\\\"action\\\": \\\"run\\\"}\"}'","Create a recurring schedule using a cron expression: --schedule-expression 'cron(0 9 * * ? *)' for daily at 09:00 UTC","Set a flexible time window for rate-limiting: --flexible-time-window '{\"Mode\": \"FLEXIBLE\", \"MaximumWindowInMinutes\": 15}' to allow the scheduler to invoke within a 15-minute window after the scheduled time","Configure retry policy and DLQ on the target block: RetryPolicy with MaximumRetryAttempts (0–185) and MaximumEventAgeInSeconds (60–86400), plus DeadLetterConfig.Arn pointing to an SQS queue","Assign the Scheduler execution role permissions to invoke the target service (e.g., lambda:InvokeFunction) and sqs:SendMessage on the DLQ","Monitor failed invocations via the InvocationFailedToBeSentToDeadLetterCount CloudWatch metric on the schedule"],"gotchas":["EventBridge Scheduler is a separate service from EventBridge rules-based scheduling (cron/rate on event buses); Scheduler supports up to 185 retry attempts with exponential backoff while rule-based scheduling retries are configured on the target","Flexible time windows spread load but do not guarantee a specific sub-window delivery time; do not use them for hard deadline tasks","Schedules in the ENABLED state continue to fire even after a one-time at() schedule triggers; delete or disable the schedule after a one-time run to avoid unintended future invocations if the scheduler fails to self-delete"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:30.178Z"},"url":"https://mcp.waymark.network/r/c175b9b5-f628-426a-9292-80f083dd5c26"}