When I use Lambda trigger from CloudWatch/EventBridge rules, if the message eventually fails and gets send to a DLQ, the message receives extra attributes, more specifically RequestID
, ErrorCode
and ErrorMessage
.
I would like to have that same behaviour when using SQS Lambda triggers. Is there any way to do that?
If that is not possible, it would be a great addition to SQS, especially if we could do that along with ReportBatchItemFailures
by adding the extra metadata for each message.
{
"batchItemFailures": [
{
"itemIdentifier": "id1",
"messageAttributes": {
"RequestId": { "StringValue": "<some-uuid>" }
}
}
]
}