Como usar a auth in -Rest API Calling

const username = 'username';
const password = 'password';

var request = {
    host: endpoint,
    method: 'POST',
    path: '/_bulk',
    body: body,
    headers: {
        'Content-Type': 'application/json',
        'Host': endpoint,
        'Content-Length': Buffer.byteLength(body),
        'X-Amz-Security-Token': process.env.AWS_SESSION_TOKEN,
        'X-Amz-Date': datetime,
    },
    auth: {
        'username': username,
        'password': password
    }
};
Rizz