Events getting nested/wrapped when passing them from DLQ with Eventbridge Pipe to Lambda?

0

I´m having difficulties to properly handle events which are passed to a target lambda by eventBridge Pipe.

Here is what i´m doing:

  • I´m using a DLQ for failed Cloudwatch Event invocations on Lambda (using Lambda function DeadLetterQueue property)
  • I´m using an Eventbridge Pipe to get the Events from the DLQ and passing them to another target Lambda function.
  • In the target´s lambda handler i´m using *events.CloudWatchEvent as incoming parameter.

When the target lambda is invoked it seems that i´m receiving a nested Event structure with other Events as body/detail:

CloudwatchEvent from Pipe

SQS Message from DLQ

original CloudwatchEvent

With this behavior i´m forced to unmarshal all of the three event levels to get the original event i´m searching for.. In all of the documentations of eventPipes it is never mentioned that you have to do such explicit manual handling of nested event structures. If this is normal behavior you always would have to write specific code to retrieve the event you are looking for..

Question:
Is this expected behavior or am i doing something wrong here?
Is there a way to get the original event which was pushed to the DLQ directly in the target lambda?

답변 없음

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

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

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

관련 콘텐츠