Im planning to use Amazon EventBridge in my application. I see events are throttled beyond certain quotas. Though it is in range of 100s to few 1000s, I would hate to lose events and proactively add more buses to handle the high velocity of events. From the API's, I see PutEvents throws a 500
as exception https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html
Has anyone reliably used PutEvents exception to handle this condition and add buses? I see there is FailedEntryCount
, but the documentation doesn't indicate why the failure could be. So, Im not sure if I can rely on. I can use other services (SQS, DB), but want to use EventBridge for my use case.
If there is another route (CloudTrail PutEvents) or CloudWatch Logs to handle, Im open to hear.
EventBridge's PutEvents API has soft-limits and can be increased per account.
You have two questions, as I see it: one being how throttling works and the other around FailedEntryCount
.
Throttling will be on the operation itself (i.e when you call PutEvents) (tip: try and batch up to 10 events a time - will help with latency). If you get throttled, the AWS SDK will transiently retry assuming your call rate is not substantially and sustained higher than your allocated limits. If after a few retries it is still throttled, the entire operation will fail. If this does, you can safely assume your events have not been ingested.
I would recommend monitoring throttling/error rates and volume to proactively increase your PutEvents limit in EventBridge. There are various options to do this, so I won't include that here.
Either way, reach out to AWS Support to see how they can help with limit increases.
Since this is a batch API you should always check if FailedEntryCount > 0, and retry entries that have failed to be ingested (if applicable). FailedEntryCount
can be relied upon as it's telling you explicitly that entries failed, and you should check the response as to which ones failed.