Reputation: 13335
I have an S3 bucket with tens of thousands of audio files and thousands of video files that I need to transpose via MediaConvert.
Before I go ahead and write a function that I can run as a lambda to iterate the bucket and start all of MediaConvert jobs, is there a less laborious approach to achieve the same goal?
Upvotes: 0
Views: 1298
Reputation: 166
AWS Elemental MediaConvert does not natively have that functionality; however, there is a GitHub project that leverages CloudFormation templates to create a stack for simulating "Watchfolder" processing between S3 and MediaConvert via Lambda functions.
Here's a link to the project: https://github.com/aws-samples/aws-media-services-vod-automation/tree/master/MediaConvert-WorkflowWatchFolderAndNotification
From the project's README.md file:
Walkthrough of the Workflow
- The Ingest user uploads a video to the WatchFolder bucket /inputs folder in S3. Only files added to the /inputs folder will trigger the workflow.
- The s3:PutItem event triggers a Lambda function that calls MediaConvert to convert the videos.
- Converted videos are stored in S3 by MediaConvert.
- When the conversion job finishes MediaConvert emits aws:mediaconvert Job State Change Event type CloudWatch events with the job status.
- The COMPLETE and ERROR status events trigger SNS to send notifications to subscribers.
Since the Lambda is triggered by s3:PutItem events, this means you may have to move those tens of thousands of assets to the /inputs folder which could incur costs.
Upvotes: 1