无法解析AWS弹性代码转换器终结点

本文关键字:代码转换器 结点 AWS | 更新日期: 2023-09-27 18:26:52

我正在进行一个项目,该项目要求通过使用AWS弹性转码器对视频进行转码并提取缩略图。我已经尽我所能遵循了api,并拥有了我认为正确的代码。然而,我仍然收到一个抛出NameResolutionFailure的错误和一个内部异常,说The remote name could not be resolved: 'elastictranscoder.us-west-2.amazonaws.com'我的代码是:

        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);

我在俄勒冈州配置了s3存储桶,并添加了使文件公开的策略。

无法解析AWS弹性代码转换器终结点

显然我的虚拟机没有连接到互联网,这就是抛出nameresolutionfailure的原因。现在一切都很好。