[{"data":1,"prerenderedAt":31},["ShallowReactive",2],{"snippet-eventbridge-scheduler-dlq":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":17,"meta":19,"resources":20,"services":21,"snippets":23,"stem":27,"tags":28,"type":29,"__hash__":30},"snippets\u002Fsnippets\u002Feventbridge-scheduler-dlq.json","Schedule with dead-letter queue - Adding DLQ for failed executions",[7],"content\u002Fcontributors\u002Frajil-paloth.json","Adding an Amazon SQS DLQ on an existing EventBridge Schedule to capture failed executions","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Feventbridge-scheduler-dlq",{"headline":14,"text":15},"How it works",[16],"CLI Command executes the EventBridge Scheduler API call which adds the DLQ to the scheduler",[18],"AWS CLI",{},null,[22],"eventbridge",[24],{"title":25,"language":18,"code":26},"Add a DLQ to an existing Schedule","aws scheduler update-schedule \\\n  --name \"&#60;NAME-OF-THE-SCHEDULE&#62;\" \\\n  --schedule-expression \"&#60;THE SCHEDULE EXPRESSION; EX: rate(1 hour)\" \\\n  --flexible-time-window '{\"Mode\": \"OFF\"}' \\\n  --target '{\n    \"Arn\": \"&#60;TARGET ARN; FOR EXAMPLE - LAMBDA FUNCTION ARN&#62;\",\n    \"RoleArn\": \"&#60;ARN FOR THE ROLE WHICH HAS A TRUST RELATIONSHIP WITH scheduler.amazonaws.com AND HAS TARGET PERMISSIONS&#62;\",\n    \"RetryPolicy\": {\n      \"MaximumRetryAttempts\": 3,\n      \"MaximumEventAgeInSeconds\": 3600\n    },\n    \"DeadLetterConfig\": {\n      \"Arn\": \"&#60;ARN OF THE SQS QUEUE - MAKE SURE THE RoleArn HAS sqs:SendMessage PERMISSIONS ON THE QUEUE&#62;\"\n    }\n  }'","snippets\u002Feventbridge-scheduler-dlq",[],"AWS EventBridge Scheduler","_cnlrghKkPxqiA8b3bfOQHPqCGS7kfEN2oKDrsukJ7Y",1792665263026]