I'm writing a microservice (in .netcore) that will handle some requests using WebAPI, but also it needs to react to some external events. I see 2 possibilities how to solve it (on a very high level):
Have a lambda that is triggered by SQS message, and put event(s) handling logic in that lambda function.
Have a background process in my WebApp project (the same that hosts webAPI) which will be listening (reading) from SQS.
Are there any strong arguments to favour one approach over another? Or is it strongly opinionated?