mangum
mangum copied to clipboard
How To: How to form SQS event to look like REST body as if coming from API Gateway
Hi, I am reading about Mangum adapter but wondering if I already have a API Gateway and Lamdba using REST, and I want to introduce an SQS queue that can trigger same or other lambda but i want to use Mangum API I already built - can I form an SQS event that looks like a REST Post method and have that handled by the default handler? Or do I have to intercept the event as in your documentation on Adapters. I want SQS queue to invoke FAST API the same was as API Gateway. Maybe overkill? thank you! Marty
Is there a specific reason you must go through the "front door"?
If you absolutely need to, I would recommend:
SQS -> Special Lambda Worker -> requests.get(...)