Is there a way to get the raw request payload from API Gateway to SQS?

Viewed 4

I have Webhook -> API Gateway -> SQS -> Lambda structure, but i'm struggling with getting the message from SQS correctly. Basically I need the request body in the exact structure that I receive it to verify the webhook which is a dictionary that looks like this:

{ "notificationId": "12345", "eventType": "123", "eventDate": "2022-09-05T01:23:48.138249Z", "webhookId": "123", "payload": { "responseCode": 123, "authCode": "123", "avsResponse": "123", "authAmount": 1, "invoiceNumber": "123", "entityName": "123", "id": "123" } } There are some mapping templates for this but it'll either make it a string or remove the indents, which causes the verification to fail. Wondering if anyone knows a workaround here? thanks

0 Answers
Related