Eventbridge Bugs

0

Hey, since I started logging my API calls I realized there might be some bugs in Eventbridge scheduled HTTP Api Invocations. In general, the Apis don't get invoked when they should be. Often they get invoked twice instead of once.

For example my Eventbridge cron expression is: 10 8-18 ? * 2-6 *

so at minute 10 from 8-18 on any day of the month on any month from 2nd to 6th day of the week (which ends up being Monday to Friday) and any year.

Now my API logs for this look like this:

  • 2022-03-14 13:30:08.963665 +00:00
  • 2022-03-14 13:34:02.215564 +00:00
  • 2022-03-14 13:38:29.776793 +00:00
  • 2022-03-14 13:43:29.320522 +00:00
  • 2022-03-14 13:46:57.916126 +00:00
  • 2022-03-14 13:51:55.419461 +00:00
  • 2022-03-14 13:56:47.090243 +00:00
  • 2022-03-14 14:00:41.538169 +00:00
  • 2022-03-14 14:06:09.226878 +00:00
  • 2022-03-14 14:09:23.691206 +00:00
  • 2022-03-14 14:10:22.682902 +00:00
  • 2022-03-14 14:11:25.746832 +00:00
  • 2022-03-14 14:13:23.880627 +00:00
  • 2022-03-14 14:15:23.361370 +00:00
  • 2022-03-14 14:16:43.967781 +00:00
  • 2022-03-14 14:19:01.799442 +00:00
  • 2022-03-14 14:24:30.163322 +00:00
  • 2022-03-14 14:25:09.470810 +00:00
  • 2022-03-14 14:27:52.924405 +00:00
  • 2022-03-14 14:33:32.610750 +00:00
  • 2022-03-14 14:33:44.313787 +00:00

It gets invoked many more times!!! Day of the week, month etc. seem to work

and in the header it shows AWS eventbridge. "user-agent": "Amazon/EventBridge/ApiDestinations" so it definitely gets invoked by Evenbridge. What is going on??

asked 2 years ago559 views
3 Answers
1
Accepted Answer

Could it be that that the API destination returns an error that causes a retry?

profile pictureAWS
EXPERT
Uri
answered 2 years ago
profile picture
EXPERT
reviewed 16 days ago
  • Hey, I was thinking a similar thing the requests in the example definitely return a 200 (since I record that as well) but they do take some time (like 5-15 seconds) maybe there is some kind of internal timeout? However, that might explain the 2 attempts in a row but not the random times.

  • API Destinations maximum timeout is 5 seconds. If it takes your backend longer to respond, EventBridge will retry for up to 24 hours.

0

Hey, it was the timeout thanks, Uri. I think it is pretty unintuitive that there is a default behavior of retrying your API calls for 24 hours for 185 times. What happened is that amazon killed the call after 5 seconds. However, the request was normally processed by lambda and returned a 200 from its side.

answered 2 years ago
0

My experience: I inputed 0 instead of blank in ...Rules> my-rule > Edit rule > Retry attempts - optional then it stopped calling twice.

Saeed
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions