Search code examples
c#amazon-web-servicesamazon-s3amazon-elastic-transcoder

AWS Elastic Transcoder Endpoint cannot be resolved


I'm working on a project that requires video to be transcoded and thumbnails extracted through use of AWS Elastic Transcoder. I have followed the api to the best of my abilities and have what seems to me correct code. However, I still get an error with NameResolutionFailure thrown and an inner exception saying that The remote name could not be resolved: 'elastictranscoder.us-west-2.amazonaws.com'My code is:

        var transcoder = 
                      new AmazonElasticTranscoderClient(Constants.AmazonS3AccessKey, 
                                Constants.AmazonS3SecretKey, RegionEndpoint.USWest2);
        var ji = new JobInput
        {
            AspectRatio = "auto",
            Container = "mov",
            FrameRate = "auto",
            Interlaced = "auto",
            Resolution = "auto",
            Key = filename
        };

        var output = new CreateJobOutput
        {
            ThumbnailPattern = filename + "_{count}",
            Rotate = "auto",
            PresetId = "1351620000001-000010",
            Key = filename + "_enc.mp4"
        };

        var createJob = new CreateJobRequest
        {
            Input = ji,
            Output = output,
            PipelineId = "1413517673900-39qstm"
        };

        transcoder.CreateJob(createJob);

I have my s3 buckets configure in Oregon and added policies to make the files public.


Solution

  • Apparently my virtual machine was not connecting to the internet, which is why the nameresolutionfailure was thrown. Everything is fine now.