我想使用 aws mediaconvert 服务进行视频拼接。拥有一个 AWS 付费账户,可以访问 mediaConvert 服务。能够通过 mediaConvert 控制台创建视频拼接作业。现在我正在尝试使用 AWS java SDK 做同样的事情。将所有权限分配给 IAM 用户并为 mediaConvert 服务创建角色。
这样做时,我收到以下错误
com.amazonaws.services.mediaconvert.model.ForbiddenException:您必须使用订阅 API 为您的帐户订阅服务,然后才能使用此操作。
堆栈跟踪:
com.amazonaws.services.mediaconvert.model.ForbiddenException: You must use the subscription API to subscribe your account to the service before using this operation. (Service: AWSMediaConvert; Status Code: 403; Error Code: ForbiddenException; Request ID: bba9a221-54b7-47cc-9e2a-88eeece245ea)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1726) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1381) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1127) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:784) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:752) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:726) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:686) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:668) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:532) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:512) ~[aws-java-sdk-core-1.11.699.jar:na]
at com.amazonaws.services.mediaconvert.AWSMediaConvertClient.doInvoke(AWSMediaConvertClient.java:1874) ~[aws-java-sdk-mediaconvert-1.11.699.jar:na]
at com.amazonaws.services.mediaconvert.AWSMediaConvertClient.invoke(AWSMediaConvertClient.java:1841) ~[aws-java-sdk-mediaconvert-1.11.699.jar:na]
at com.amazonaws.services.mediaconvert.AWSMediaConvertClient.invoke(AWSMediaConvertClient.java:1830) ~[aws-java-sdk-mediaconvert-1.11.699.jar:na]
at com.amazonaws.services.mediaconvert.AWSMediaConvertClient.executeCreateJob(AWSMediaConvertClient.java:333) ~[aws-java-sdk-mediaconvert-1.11.699.jar:na]
at com.amazonaws.services.mediaconvert.AWSMediaConvertClient.createJob(AWSMediaConvertClient.java:304) ~[aws-java-sdk-mediaconvert-1.11.699.jar:na]
at com.learn.aws.controller.MediaConvertController.runMediaConvertJob(MediaConvertController.java:45) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_221]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_221]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221]