title: Axios in lambda not waiting for response
body: <p>I am invoking axios post method in aws lambda. Most of the times lambda does not return any result.logs show the following results </p>
  
  <blockquote>
    <p>START RequestId: ac92d268-d212-4b80-a06c-927922fcf1d5 Version: $LATEST
    END RequestId: ac92d268-d212-4b80-a06c-927922fcf1d5</p>
  </blockquote>
  
  <p>But some times lambda return expected results. Looks like lambda is not waiting for axios to complete. below is lambda code.                                   </p>
  
  <pre><code>var axios = require('axios')
  exports.handler = async (event, context,callback) =&gt; {
      axios.post('https://example.com/testapi/api.asmx/GetNames', {})
      .then((res) =&gt; {    
        console.log(JSON.stringify(res.data,null,2))
        callback(null,'success');
      })
      .catch((error) =&gt; {     
        console.error(error)
        callback(null,'error');
      })    
   };
  </code></pre>