Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chapter-2/twentyfour-hour-video/transcode-video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

'use strict';

const AWS = require('aws-sdk');
const mediaConvert = new AWS.MediaConvert({
const { MediaConvertClient, CreateJobCommand } = require("@aws-sdk/client-mediaconvert");
const mediaConvert = new MediaConvertClient({
endpoint: process.env.MEDIA_ENDPOINT
});

Expand Down Expand Up @@ -61,7 +61,7 @@ exports.handler = async (event, context) => {
}
};

const mediaConvertResult = await mediaConvert.createJob(job).promise();
const mediaConvertResult = await mediaConvert.send(new CreateJobCommand(job));
console.log(mediaConvertResult);

} catch (error) {
Expand Down