# Event Bridge Dead Letter Config

**URL:** <https://forum.serverless.com/t/event-bridge-dead-letter-config/15326>\
**Category:** Serverless Framework\
**Created:** [June 16, 2021, 11:00am UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326 "2021-06-16T11:00:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepak](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/deepak/32/5627_2.png) [@deepak](https://forum.serverless.com/u/deepak)\
**Post date:** [June 16, 2021, 11:00am UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326/1 "2021-06-16T11:00:33Z")

</div>

Hey there,  
The serverless docs of Event Bridge [here](https://www.serverless.com/framework/docs/providers/aws/events/event-bridge/) do not mention how to set up a dead letter queues and retry attempts. I was hoping the configuration would look something like below but it did not work.  
Is there a way to add DLQ on a Lambda invoked by Event Bus?

```auto
myLambda:
    handler: ./src/functions/destinationLambda/index.handler
    events:
      - eventBridge:
          eventBus: arn:aws:events:region:accountID:event-bus/busname
          deadLetterConfig: 
            arn: arn:aws:sqs:region:accountID:sqs-name
          pattern:
            source: 
              - ${self:custom.sourceNameForEventBus}

```

---

<div class="post-metadata">

**Author:** ![Murdoch](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@Murdoch](https://forum.serverless.com/u/Murdoch)\
**Post date:** [August 19, 2021, 2:56pm UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326/2 "2021-08-19T14:56:27Z")

</div>

I need to do the same thing. I assume this isn’t supported since there has been zero activity/response to your question. ☹

---

<div class="post-metadata">

**Author:** ![deepak](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/deepak/32/5627_2.png) [@deepak](https://forum.serverless.com/u/deepak)\
**Post date:** [August 19, 2021, 3:24pm UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326/3 "2021-08-19T15:24:27Z")

</div>

Yeah, they are still trying to add this feature. In the end, I just wrote cloudformation in my serverless.yml to add Dead letter queue

---

<div class="post-metadata">

**Author:** ![dhoulker](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/dhoulker/32/6145_2.png) [@dhoulker](https://forum.serverless.com/u/dhoulker)\
**Post date:** [August 28, 2021, 9:55am UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326/4 "2021-08-28T09:55:40Z")

</div>

Hello, I’m trying to do exactly the same thing, do you have any example of how you did by any chance?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![deepak](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/deepak/32/5627_2.png) [@deepak](https://forum.serverless.com/u/deepak)\
**Post date:** [August 31, 2021, 2:35pm UTC](https://forum.serverless.com/t/event-bridge-dead-letter-config/15326/5 "2021-08-31T14:35:14Z")

</div>

You can write something like this in your serverless.yml’s resources section,  
Note: lambda:InvokeFunction is necessary permission to add

```auto
    CustomBusRule: 
        Type: AWS::Events::Rule
        Properties: 
            EventBusName: ${self:custom.eventBusName}
            EventPattern: 
                source: 
                    - my-source
            State: "ENABLED"
            Targets: 
            - 
                Arn: 
                    Fn::GetAtt: 
                        - "<lambdaName>LambdaFunction"
                        - "Arn"
                Id: "random"
                DeadLetterConfig:
                    Arn: ${self:custom.sqsARN}
    PermissionInvokeLambda: 
        Type: AWS::Lambda::Permission
        Properties: 
            FunctionName: !Ref "<lambdaName>LambdaFunction"
            Action: "lambda:InvokeFunction"
            Principal: "events.amazonaws.com"
            SourceArn: 
                Fn::GetAtt: 
                    - "CustomBusRule"
                    - "Arn"

```

Other option that I use is to call the api putTargets by writing a custom plugin
