I have some work that needs two s3 objects. Object A is uploaded by another system; I have to generate the Object B.
In fact, there is not one Object A, but several (A1, A2, A3). Each one is uploaded by an external system at any time. For each object A, another instance of the work has to be launched.
On the other hand, Object B remains the same for a specified period time, after which I have to regenerate it. Generating the object takes time.
I can use EventBridge Scheduler
to generate the object B, and I can also use event bridge to fire events for each Object Ax that gets uploaded.
My question is how do combine these two events, so that I can launch a job only after both Object B is generated, and Object Ax is uploaded, ensuring that for every object Ax that gets uploaded, exactly one job is launched.
(Something similar to Promise.all
in javascript)