[Epic] Evaluate MediaConvert examples
Evaluate the examples for creating a job that are linked to from https://docs.aws.amazon.com/mediaconvert/latest/apireference/custom-endpoints.html
- [x] #4575
- [x] #4579
- [ ] Python MediaConvert Examples
- [x] #7072
- [ ] #5150
I looked at the code. This is V1. I recommended that they upgrade to V2 and referenced the V2 in Github.
Can you help address the following notes from my internal QA team, who attempted to run the Java examples?
When I try:
./run_example.sh CreateJob 'arn:aws:iam::REDACTEDROLE:role/service-role/MediaConvert_Default_Role''s3://mediaconvert/input.ts'
I get:
[ERROR] No plugin found for prefix 's3' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/REDCATEDUSER/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
So I created a presigned url for the output https://..........
./run_example.sh CreateJob 'arn:aws:iam::REDACTEDROLE:role/service-role/MediaConvert_Default_Role' "$pre_signed_url"
And I got this error:
[ERROR] No plugin found for prefix 'https' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/REDACTEDUSER/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
I'm not sure how I should proceed.
I was able to run ./run_example.sh ListJobs
and ./run_example.sh GetEndpointURL
One point of note is that it was unclear that I had to set endpointURL in the config.properties file (and maybe s3path?)
@scmacdon, could you take a look for Jared?
I just executed Java V2 CreateJob and it passed the test and created the job. Output is:
MediaConvert service URL: https://mlboolfjb.mediaconvert.us-west-2.amazonaws.com MediaConvert role arn: arn:aws:iam::xxxxx8047983:role/MediaConvert_Default_Role MediaConvert input file: s3://bucketscottxxxxxx/Sample.mp4 MediaConvert output path: s3://bucketscottxxxxx/javasdk/out/ Test 1 passed
All files were in the proper S3 bucket location.
Reach out to me at [email protected] and i can help you more.
Feedback regarding the Kotlin examples from our QA team:
Blocking Issues
- The MediaConvert endpoint must be cached. Example code should accept an endpoint from a config file or other parameter before falling back to the mcClient.describeEndpoints() function call. See the C++ code.
- The https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup-create-project-file.html has the wrong kts filename.
- The correct file name is build.gradle.kts
- The latest gradle, 8.0, has deprecated the WrapUtil class. gradle run will fail when running this code from gradle 8.0. [WrapUtil link] I do not know how to fix this.
- The following two imports for CreateJob.kt fail with version 0.18.0-beta or 0.24.0-beta and the build.gradle.kts file:
import aws.smithy.kotlin.runtime.client.endpoints.Endpoint
import aws.sdk.kotlin.services.mediaconvert.model.AacRateControlModed\
Suggestions
- Add build.gradle.kts and/or pom.xml to the source tree so that users can get a good configuration without having to guess at what's needed
- Add a mcEndpoint and outputLocation to the command line parameters for CreateJob
- Separate the output location from the inputFile location. Workflows have sources separate from end-user content.
- Import a job.json definition, then lightly modify it using the API model calls (See the C++ code for json import)
- Have a Makefile.gradle and Makefile.maven for the two recommended package managers
- Mention how to create and run a project. I assume with the 4 parameters (mcEndpoint, arn, input, outputLocation) it's something like:
gradle make
gradle run CreateJob https://4l8tgbpha.mediaconvert.us-west-2.amazonaws.com \
arn:aws:iam::578553157327:role/service-role/MediaConvert_Default_Role \
s3://mediaconvert/my_input_file.mp4 \
s3://mediaconvert-output/public-playback/example/
Also, thanks in advance!
@scmacdon Can you take a look at the Kotlin feedback?