Credential issue while using Media Convert with aws-sdk

0

I'm having an issue while using Media Convert with aws-sdk. First I uploaded a video using my s3 configuration but then after I configured media convert it gave an error credential was missing

This is my configuration

    const mediaconvert = new AWSS.MediaConvert({
        endpoint: My Media convert endpoint,
        accessKeyId: My Id,
     secretAccessKey: My Key,
        region: 'us-west-2',
    });

    const params = {
        Role: 'arn:aws:iam::650142100629:role/service-role/MediaConvert_Default_Role',
        Settings: {
            Inputs: [{
                FileInput: `s3://${bucket_name}/${inputKey}`,
            }],
            OutputGroups: [{
                OutputGroupSettings: {
                    Type: 'HLS_GROUP_SETTINGS',
                    HLSGroupSettings: {
                        SegmentLength: '6',
                        MinSegmentLength: '0',
                        Destination: 's3://${bucket_name}/videos/',
                    }
                },
                Outputs: [{
                    Extension: 'm3u8',
                    NameModifier: '_output',
                    ContainerSettings: {
                        Container: 'M3U8',
                        M3u8Settings: {
                            AudioFramesPerPes: 4,
                            PcrControl: 'PCR_EVERY_PES_PACKET',
                            PmtPid: '480',
                            VideoPid: '481',
                            AudioPid: '482',
                            TimedMetadataPid: '503',
                            PatInterval: 0,
                            PmtInterval: 0,
                            Scte35Pid: '500'
                        }
                    }
                }]
            }]
        }
    };

    return new Promise((resolve, reject) => {
        mediaconvert.createJob(params, (err, data) => {
            if (err) {
                console.error('Error creating MediaConvert job:', err);
                reject(err);
            } else {
                console.log('MediaConvert job created successfully:', data);
                resolve(data);
            }
        });
    });
asked 3 months ago97 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions