function getTempCredentials()

in connect-audio-stream-solution/initContactDetailsFunction/contact_init.js [79:99]


function getTempCredentials(callback, contactId){
    var params = {
        DurationSeconds: 900,
        ExternalId: "AI_Powered_SA_for_AC",
        RoleArn: process.env.assume_role,
        RoleSessionName: contactId
    };
    var sts = new AWS.STS();
    sts.assumeRole(params, function (err, data) {
        if (err) {
            console.log(err, err.stack); // an error occurred
            callback(null, buildResponse(false, err));
        }
        else{
            //console.log(data);           // successful response
            callback(null, buildResponse(true, data));
        }

    });

}