Adding attributes to failed messages being moved to DLQ using SQS Lambda trigger

2

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>" }
            }
        }
    ]
}
gefragt vor 4 Monaten110 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen