0

I can't seem to work out how to access to the data or error object when making an AWS client request

I do NOT want to use the async promise feature. This is purely a question of how to access the data and error property of the AWS.Response object.

Here's the code:

const mediatailor = new AWS.MediaTailor();
function describeSourceLocation(SourceLocationName) {
    let params = {
        SourceLocationName: SourceLocationName
    };
    return mediatailor.describeSourceLocation(params).response
}
console.log(describeSourceLocation('test'))

The output of the function always has error and data properties null. How can I read the response data of the request?

0 Answers0