I'm relatively new to AWS. I'm working with what I think is a common pattern:
- Put file in S3 bucket
- Do something with said file in Lambda function
I see two options for making this link (ignoring SNS):
- invoke the lambda when an S3 event occurs
- send the S3 event to an SQS queue, which in turn triggers the lambda
It won't be handling a huge number of events to begin with, but the hope is to hook up a lot more buckets to this lambda in the future. Immediate invocation, message ordering, and speed/time is not of critical importance. However retries, capturing files that "fail", DLQs, and all that good stuff is important.
I'm leaning towards the SQS route. I think it fits better with my requirements, it's the one I've managed to make a working terraform module for, and I don't think it will add to my bill in any significant way.
Is this a matter of opinion or is there an objectively better option here?