console.log write parameter from function as undefined

I use the following code to get AWS ECS status. But while try to debug I recognized that
serviceName is always “undefined”. Why?
It seems that the AWS SDK functions inside this codeblock use serviceName with the correct value.

async function checkServiceStatus(clusterArn, serviceName) {

    const listTasksParams = {
      cluster: clusterArn,
      serviceName: serviceName
    };
    
    const listTasksResult = await ecs.listTasks(listTasksParams).promise();
    
    if (listTasksResult.taskArns.length === 0) {
        console.log('No tasks found');
        return 500;
    }
    
    // Describe the tasks to get their status
    const describeTasksParams = {
      cluster: clusterArn,
      tasks: listTasksResult.taskArns
    };
    
    const describeTasksResult = await ecs.describeTasks(describeTasksParams).promise();
    
    const taskStatuses = describeTasksResult.tasks.map(task => task.lastStatus);

    console.log(serviceName);
    return "200";

  }
  
module.exports = {

    checkCall: async function(srvName){
        const clusterArn = process.env.ECSCLUSTERARN;

        var ecsResponse = ""

        return new Promise(async function (resolve, reject) {

            try {
                ecsResponse = await checkServiceStatus(clusterArn, srvName);
              } catch (err) {
                reject(err);
              }  
              
            resolve(ecsResponse );
            
        });
    }
};