Search code examples
aws-lambdaaws-event-bridge

Will EventBridge consider an Event as Delivered/Success, when the Event is throttled at the target Lambda function


The target of my EventBridge rule is a Lambda function. While creating the rule, it was noticed that the default value for retry attempts is set at 185. If the function's concurrency limit is reached and the rule tries to send a new event to Lambda, I assume the event is throttled. Now, will EventBridge rule retry sending this throttled event to Lambda?

I conducted an experiment by setting the reserved concurrency to 5 and then simultaneously sending 7 events to the EventBus, all of which matched the same rule pattern. Interestingly, I observed that all 7 events were processed by Lambda. Initially, I assumed that an event was throttled at Lambda and the EventBridge rule retried, but then I discovered that asynchronous event invocations to Lambda are queued and some form of retry occurs when the function is throttled. I am curious: is my retry due to the Lambda retry policy or the EventBridge retry policy?


Solution

  • EventBridge delivers the event asynchronously, and Lambda puts all such events into some internal queue and when the event gets picked and error occurs while execution happens, it can be retried to a max of two times, but if event cannot be passed to handler due to concurrency limit it will be kept back into the queue and will be retried again, and max configurable age of any event in the queue is 6 hours.