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??

질문됨 2년 전572회 조회
3개 답변
1
수락된 답변

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

profile pictureAWS
전문가
Uri
답변함 2년 전
profile picture
전문가
검토됨 한 달 전
  • 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.

답변함 2년 전
0

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

Saeed
답변함 10달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠