- 新しい順
- 投票が多い順
- コメントが多い順
Hi Paolo - You can use Amazon SQS delay queues to ensure 5 minutes delay. So flow could be like this -
File uploaded to S3 --> Event Bridge rule to push the messages into SQS delay queue --> Message is delivered after the delay.
This way you will be sure that there's a 5 minutes delay before you receive the message, so when your code runs, you can just look for the files present in S3 at that time.
There is no single service that will give you want you want. I think your best option is to catch the file upload event. If the upload belongs to a new session, create an EventBridge schedule that will fire in 5 minutes. If the file belongs to an existing session, discard the event, or maybe extend the timer, if it makes sense.
You should use something like DynamoDB to track the sessions, and if you want, you can also add the uploaded files to the DDB table so that later, when the timer expires, you will already have the list of files.
Yes could be a possible solution but we need to define a logic in lambda to discard events that are triggered with delay that have been altready processed by the first event. We were hoping to avoid this option