Webhook for when a demo becomes available



I was wondering if it would be possible to add a webhook for when a demo is available for download.

Currently I am using the match_finished webhook but the demo can take 10 minutes before it is available - I would like to see if it possible to add a webhook that would function in a similar way to the match_finished webhook.

I am doing some research currently to see if it is possible to trigger an event from s3 that I could use but I’m not sure if I can add a trigger to a public s3 bucket like the demos one.

Please let me know if this is something you would consider,



Okay so the solution I have come up with is this:

  1. When match_finished webhook is called, create a CloudWatch events rule for the match that runs on a configurable schedule. I am using 3 mins currently
  2. The target for the rule is my lambda function that will attempt to download the demo - If it is 404 then it will exit early
  3. If the demo is successfully streamed then the lambda will delete/cleanup the scheduled rule that was created

This should allow me to poll for the demo without incurring any extra charges in the ‘waiting’ period for the demo, other than during the actual run time of the lambdas.