Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How To: How to form SQS event to look like REST body as if coming from API Gateway #298

Open
MartyBolton opened this issue Jul 12, 2023 · 1 comment

Comments

@MartyBolton
Copy link

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

@nitsujri
Copy link

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(...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants