title: Returning a promise in async function - What is a more elegant / better practice solution?
body: <p>I am fairly new to async/await and while the following code seems to be working just fine, I have a sense that there must be a much more elegant / best practice way to write this function:</p>
  
  <pre><code>    /**
       * 
       * @param {string} email user email address
       * @description validates project exists and project owner is userId.
       * @returns {Promise} resolves userId if found otherwise null
       */
      async getUserFirstAndLastName (userId) {
          var userName;
          return new Promise(function(resolve, reject){
              var params = {
                  UserPoolId: process.env.userPoolId, /* required */
                  AttributesToGet: [
                  'given_name',
                  'family_name'
                  /* more items */
                  ],
                  Filter: `sub = \"${userId}\"`
              };
              console.log("UserUtils DDB Get User First and Last Name:" + JSON.stringify(params, null,'  '));
              cognitoidentityserviceprovider.listUsers(params, function(err, data) {
                  if(err){ // an error occurred
                      console.log(err, err.stack);
                      reject(err); // throw error
                  }
                  else { // successful response
                      console.log("Data: " + JSON.stringify(data, null,'  '));
                      if(data.Users.length){
                          userName = data.Users[0].Attributes[0].Value + " "; // First Name
                          userName += data.Users[0].Attributes[1].Value; // Last Name
                          resolve(userName); //return
                      }
                      else {
                          resolve(null); // no user found that matches email
                      }
                  }
              });
          });
      }
  </code></pre>
  
  <p>Seeking guidance...</p>