Home > Blockchain >  AWS MediaConvert job settings unit tests
AWS MediaConvert job settings unit tests

Time:06-01

I am using CreateJobCommandInput, CreateJobCommand, MediaConvertClient from @aws-sdk/client-mediaconvert to submit MediaConvert job. CreateJobCommandInput contains a lot of different parameters. I would like to check if those parameters are valid using some sort of unit tests. Is this possible?

CodePudding user response:

Thanks for your message. AWS MediaConvert validates job settings upon submittal. Unit testing (individual feature testing) is not supported today.

However, you can save a collection of validated output settings as an output preset which can be re-used and stacked (combined) on future jobs. You can test, validate and accumulate collections of output settings in this way.

Additional tips: [a] when testing settings, you can use the 'input clipping' function to convert just 30s of content for a quicker result on your tests.

[b] All 'create job' calls will have an API log record which you can retrieve via AWS CloudTrail. Jobs which execute will also get a log entry in AWS CloudWatch.

[c] Fronting your S3 destination bucket with a CloudFront distribution will allow you to stream/access your outputs without making the S3 bucket itself public-readable. You can optionally restrict access to the CF distribution in various ways using AWS Web Application Firewall.

You can see the full specification for all available parameters using a command of the form 'aws mediaconvert create-job --generate-cli-skeleton'

  • Related