79527955

Date: 2025-03-22 19:03:33
Score: 0.5
Natty:
Report link

EventBridge rules won’t fire when a Lambda times out on an async invocation because async Lambda invocations don’t emit detailed failure events like TimeoutError to EventBridge.

Instead of trying to detect the timeout externally, wrap your Lambda call in a Step Function.

  1. Start Execution of the state machine

  2. The first state is "Invoke Executor"

    • It calls the LambdaExecutor function

    • It has timeout of 850/870 seconds. This timeout is a safe buffer as 900 secs might not cleanly fail.

  3. If LambdaExecutor completes successfully the workflow ends successfully

  4. If LambdaExecutor fails or times out

    • The execution transitions to "Fallback Lambda"

    • This function handles error cases like cleanup, alerting or retry logic.

  5. Once Fallback Lambda finishes the workflow ends (with a failure or handled outcome)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: niteshd22