title: Lambda function specified as a Destination is not being triggered
body: <p>I have a lambda function that verifies user credentials. Upon success it should call another lambda function, as a destination, that generates a token. When I test the first function, it is successful but it does not call the destination which is the other lambda function. It only gives me the success message from the first function.</p>
  
  <h2>Function one</h2>
  
  <pre class="lang-js prettyprint-override"><code>exports.handler = function (event, context) {
  
      var id = event.email;
      var params = {
        TableName: "User",
        KeyConditionExpression: "#email = :email",
        ExpressionAttributeNames:{
          "#email": "email",
          },
        ExpressionAttributeValues: {
            ":email": {S: event.email},
        }
  
      };
  
      if (id &amp;&amp; id !== '') {
  
          dynamo.query(params, function (err, data, callback) {
              if (err) {
                  context.done(err);
              }
              else {
                  var user = data.Items[0];
                  if (user) {
                      var encryptedParams = {
                          CiphertextBlob: Buffer.from(user.password.B),
                      };
                      kms.decrypt(encryptedParams, function (err, decrypteddata) {
                          if (err) {
                              console.log(err, err.stack);
                              context.done(err);
                          }
                          else {
                              if(event.password == decrypteddata.Plaintext.toString()) {
                                  console.log("User authenticated");
                              }
                          }
                      });
                  }
              }
          });
      }
      else {
          return {
              statusCode: 400,
              body: "No email provided."
          }           
      }
  
  };
  </code></pre>
  
  <h2>Function two</h2>
  
  <pre class="lang-js prettyprint-override"><code>exports.handler = async (event) =&gt; {
  
      var expires = moment().add('days', 7).valueOf();
  
      var token = jwt.encode({
        iss: event.email,
        exp: expires
      }, app.get('jwtTokenSecret'));
  
      const response = {
          token: token,
          express: expires,
          statusCode: 200
      };
  
      console.log("token granted");
  
      return response;
  };
  </code></pre>