Skip to content

EventBridge event reaches API destination but also falls into the DLQ

0

All my events reach the API Destination endpoint without any issues but at the same time, they are considered as failed and sent to the Dead Letter Queue with the error: Unable to invoke ApiDestination endpoint: Timeout calling endpoint for API Destination: socket closed. I read there is a 5-second limit before requests are considered as failed. I don't think it's taking that long anyway, if I test my endpoint with postman it takes less than a second to return a 200. Is just a dummy endpoint that is not doing anything.
I tried in my AWS dev account with the same endpoint and I don't have this issue so I'm not sure if there is any config that could be causing this? Is there any way to increase that 5-second limit?

Thanks!

asked 2 years ago599 views
2 Answers
0

Hello.

As far as I know, it is not possible to increase the timeout value of the EventBridge destination API.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destinations.html

Is there some kind of access restriction on the API side?

EXPERT
answered 2 years ago
  • Thanks for confirming that the timeout cannot be increased! Too bad! As far as I know, there isn't any restriction, the request reaches the endpoint and should be getting a 200 right away. That same endpoint works fine in another AWS account. I'm tempted to re-create all the event bus and rules again just to see if that makes any difference :(

0

There is no way to lift the 5s API Destination timeout. But you can nicely work around it, using and intermediate Lambda (invoked through an API Gateway) and Lambda PowerTools IdemPotency as this blog post explains: https://dev.to/aws-builders/eventbridge-working-around-api-destination-5s-maximum-client-timeout-constraint-using-lambda-powertools-idempotency-1cb3

answered 2 years 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.