I have set up an on-demand video service in AWS. After uploading a video to the S3 input bucket, a Lambda function is automatically triggered, which does HLS streaming with the object to a specific folder in the output bucket. Already i have created cloudfront distribution. I want to retrieve the streamed URL from the output S3 bucket and receive a notification, So that i can then update the streammed URL in my mongoDb database ?
I want to retrieve the specific streamed URL from the output S3 bucket automatically as soon as the lambda function finishes the HLS streaming .What would be best practice here?
2
Answers
There are a few ways you can do it, you are basically looking service that can subscribe to S3 event notifications for example SQS, SNS, Lambda function etc.https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html#supported-notification-event-types
I would suggest lambda, you can update the DB table with URL in the lambda function.
The same thing happened to me; I attempted to deploy a VOD solution template on a test demo, and I received an HLS url in my email from SNS, but in the app itself. I wonder too where to find hls url and automatically retrieve it to my app.
VOD publishing workflow
I wonder can we edit lambda in this process so it will update my DBS too ?