0

i have a lambda for some processing and another one to handle errors of the processing lambda. I wired those via a custom eventbus and a rule in it.

my event rule pattern looks like this:

{
  "source": ["lambda"]
}

while the policy statement is exactly like in here https://aws.amazon.com/premiumsupport/knowledge-center/eventbridge-lambda-not-triggered/

Generally i followed the troubleshooting guide (several times), but i simply dont receive the lambda error events (other events, e.g. from sagemaker i use somewhere else work fine)

The events are also not shown in the event bus metrics.

Do i have to add some special configuration to the "event emitting" lambda (in my case the processor). Of course i have configured the custom event bus as "on failure" destination (asynchronous in my case), but are there any other things required like permissions or so?

hope someone can help me,

cheers!

user33262
  • 11
  • 2
  • by the way, the erroneous invocations (i expect to be handled be the second lambda) are listed in the cloud watch metrics as erroneous. even more, i use a custom container image in the processor – user33262 Jan 28 '22 at 12:56

2 Answers2

0

okay, i found the answer myself and actually it's quite simple and can be found if the docs are studied thoroughly.

destinations work only when lambdas are invoked asynchronously, which is supported by a number of input triggers (e.g. sns).

my lambda however listenes on sqs queues and since they rely on event source mappings, which in turn invoke the lambda synchronously, destinations are not supported. rather the batch is rejected until a message is eventually moved to dead-letter...

maybe i can help someone with the answer in the future; although i have to admit it's quite clear once you read the documentation.

as a solution i moved to a more explicit error handling approach, by actively submitting message on the event bus.

cheers!

user33262
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 01 '22 at 13:28
0

Do you know where is the invoke failed logs?

I have a lambda function. It's deployed by serverless. So a rule always be created in my custom event bus automatically. After I send a test event to my bus. This rule can be triggered. But is always invoke fail. I try to find the reason but nothing can be saw beside invoke metrics.

Strangely, if I manually create a rule for the same. This manually created rule can always fire and successfully invoke the lambda function.

Connor
  • 13
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 22 '22 at 18:38