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
35 changes: 35 additions & 0 deletions eventbridge-scheduler-dlq/snippet-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"title": "Schedule with dead-letter queue - Adding DLQ for failed executions",
"description": "Adding an Amazon SQS DLQ on an existing EventBridge Schedule to capture failed executions",
"type": "AWS EventBridge Scheduler",
"services": ["eventbridge"],
"tags": [],
"languages": ["AWS CLI"],
"introBox": {
"headline": "How it works",
"text": [
"CLI Command executes the EventBridge Scheduler API call which adds the DLQ to the scheduler"
]
},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-snippets/tree/main/eventbridge-scheduler-dlq"
}
},
"snippets": [
{
"title": "Add a DLQ to an existing Schedule",
"snippetPath": "snippet.txt",
"language": "AWS CLI"
}
],
"authors": [
{
"headline": "Presented by Rajil Paloth",
"name": "Rajil Paloth",
"image": "https://i.ibb.co/r2TsqGf6/Passport-size.jpg",
"bio": "ProServe Delivery Consultant at AWS",
"linkedin": "paloth"
}
]
}
15 changes: 15 additions & 0 deletions eventbridge-scheduler-dlq/snippet.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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>"
}
}'