The serverless framework docs of AWS Event Bridge here do not mention how to set up a dead letter queue and retry attempts. I was hoping for the configuration of serverless.yml would look something like below but it did not work.
myLambda:
handler: ./src/functions/myLambda
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}
These properties can be added after the deployment manually as shown below. But I want to add it using the framework else if there is a way to manipulate this using CloudFormation?