Schedule with dead-letter queue - Adding DLQ for failed executions

Adding an Amazon SQS DLQ on an existing EventBridge Schedule to capture failed executions

CLI Command executes the EventBridge Scheduler API call which adds the DLQ to the scheduler

Add a DLQ to an existing Schedule

aws scheduler update-schedule \
  --name "<NAME-OF-THE-SCHEDULE>" \
  --schedule-expression "<THE SCHEDULE EXPRESSION; EX: rate(1 hour)" \
  --flexible-time-window '{"Mode": "OFF"}' \
  --target '{
    "Arn": "<TARGET ARN; FOR EXAMPLE - LAMBDA FUNCTION ARN>",
    "RoleArn": "<ARN FOR THE ROLE WHICH HAS A TRUST RELATIONSHIP WITH scheduler.amazonaws.com AND HAS TARGET PERMISSIONS>",
    "RetryPolicy": {
      "MaximumRetryAttempts": 3,
      "MaximumEventAgeInSeconds": 3600
    },
    "DeadLetterConfig": {
      "Arn": "<ARN OF THE SQS QUEUE - MAKE SURE THE RoleArn HAS sqs:SendMessage PERMISSIONS ON THE QUEUE>"
    }
  }'
                                


Created by:

Rajil Paloth

Rajil Paloth

ProServe Delivery Consultant at AWS

Follow on LinkedIn