How to listen to AWS SQS messages on Flask app start? How to listen to AWS SQS messages on Flask app start? flask flask

How to listen to AWS SQS messages on Flask app start?


One approach to this (the one I favor) is to run a separate process that listens to SQS, forwarding messages to the Flask app via HTTP.

The other approach is to run both the Flask app and the SQS listener as separate threads within a single process. That's doable, but is much more complex.