Amazon S3的弹性横贯codeR错误:指定的管道未找到未找到、弹性、管道、错误

2023-09-11 23:44:32 作者:少年你这是喜脉

我在使用集成AWS-SDK-PHP的Amazon S3的弹性横贯codeR。我使用 http://elastictranscoding.blogspot.in/ 链接来完成我的任务。在实施我面临着以下错误:

I am integrating Amazon s3 Elastic Transcoder using aws-sdk-php. I use http://elastictranscoding.blogspot.in/ link to accomplish my task. While implementing i face following error:

致命错误:未捕获的AWS \ ElasticTrans codeR \异常\ ResourceNotFoundException:AWS错误code:ResourceNotFoundException,状态code:404,AWS请求ID:820ccf2d-6fc3-11e3-85a1-cdbd862f75bb, AWS错误类型:客户端,AWS错误消息:指定的管道没有被发现:账号= 008180918836,pipelineId = 1388230727728-l0b712,用户代理:AWS-SDK-PHP2 / 2.5.0狂饮/ 3.7.1卷曲/ 7.29。 0 PHP / 5.4.12扔在D:\项目\ modelpeopledemo \ amazon_upload \ AWS \公用\异常\ NamespaceExceptionFactory.php在线91

Fatal error: Uncaught Aws\ElasticTranscoder\Exception\ResourceNotFoundException: AWS Error Code: ResourceNotFoundException, Status Code: 404, AWS Request ID: 820ccf2d-6fc3-11e3-85a1-cdbd862f75bb, AWS Error Type: client, AWS Error Message: The specified pipeline was not found: account=008180918836, pipelineId=1388230727728-l0b712., User-Agent: aws-sdk-php2/2.5.0 Guzzle/3.7.1 curl/7.29.0 PHP/5.4.12 thrown in D:\projects\modelpeopledemo\amazon_upload\Aws\Common\Exception\NamespaceExceptionFactory.php on line 91

创建工作code:

require 'aws-autoloader.php';
    use Aws\ElasticTranscoder\ElasticTranscoderClient;
    $aws = Aws\Common\Aws::factory('config.json');
    createjob('trailer_480p.mp4'); exit;

function createjob($fname){
    $aws = Aws\Common\Aws::factory('config.json');
    $client = ElasticTranscoderClient::factory(array(
       'key' => 'IAM user's public key',
       'secret' => 'IAM user's secret key',
       'region' => 'us-east-1'
    ) );
    // Create a new transcoding job
    $file_name = $fname;
    $file_name_explode = explode( '.', $file_name );
    $webm_transcode_request = $client->createJob( array(
       'PipelineId' => 'my pipeline id',
       'Input' => array(
           'Key' => $fname,
           'FrameRate' => 'auto',
           'Resolution' => 'auto',
           'AspectRatio' => 'auto',
           'Interlaced' => 'auto',
           'Container' => 'auto',
       ),
       'Output' => array(
           'Key' => 'trailer_480p.mp4',
            'ThumbnailPattern' => $file_name_explode[0] . '-700thumb-{resolution}-{count}',
           'Rotate' => '0',
           'PresetId' => '1351620000001-000020' 
       )
    ) );
    return $webm_transcode_request;
}

config.json

{
    "includes": ["_aws"],
    "services": {
        "default_settings": {
            "params": {
              "key": "AWS public key",
              "secret": "AWS secret key",
              "region": "us-east-1"
            }
        }
    }
}

我的用户策略是:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
            "elastictranscoder:*",
            "s3:*",
            "iam:*",
            "sns:*"
      ],
      "Resource": "*"
    }
  ]
}

我的用户群的策略是:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Sid",
      "Effect": "Allow",
      "Action": "*",
      "Resource":"*"
    }
  ]
}

我觉得我没有被授权访问弹性跨codeR服务。请建议。预先感谢。

I think i am not authorized to access elastic transcoder service. Please suggest. Thank in advance.

推荐答案

验证您在创建工作之前'键','秘密','区域',

verify your before you create job 'key','secret','region',

检查管线区域,同时创建管道, 可能是创造就业区不同的是, 一段时间后其它地区的用户无法通过不同的地区进行连接, 仔细检查要求凭证的的请确保您的管道区域及创造就业区域必须是相同的。的

check pipeline region while you create pipeline, may be create job region is different, some time other region user not able connect via different region, double check require credential please make sure your pipeline region and create job region is must be same.