Managing AWS MediaConvert Jobs Status

My elixir/phoenix app is running on DigitalOcean and I have AWS for S3 and MediaConvert.

So now I got a simple Lambda generating HLS content using this:

Which works great, but once I have submitted a job I need to know whether it’s in Error or Complete state.

I’ve seen that MediaConvert generates CloudWatch events, but I cannot tell you can get CloudWatch to send a POST(which would be ideal to send to my phoenix endpoint, I think).

I noticed that ex_aws has a MediaConvert service module but the documentation is a little sparse. For instance, I cannot tell if list_jobs() will allow me to filter on Error and Complete. Besides, I would like to avoid polling if possible.

I’m not terribly experienced with backend development(I come from the Mac/iOS development world) so I don’t know if there is a conventional way to approach this.

Regards, Michael

I can’t speak for your particular technologies as I don’t have experience with them, but you could set up a callback url on your app that is called as a final step from the lambda, as I assume you would know the result of the operation at that point. Secure the callback endpoint by sending the lambda some kind of secure token to verify that you’re getting a reply from an expected event/operation, kind of like CSRF or OAuth work.

Yes I think lambda is the way to go. It will be over https but I was actually thinking of using AWS Key Management Encryption Services like this person here:

The app can possibly obtain the key via an aws api … or maybe just hardcore it, I’m not sure at this point.