title: Output empty array - (asynchronous)
body: <p>I'm using 3 region and using a aws configuration for output Timestamp and Average.</p>
  
  <p>But I don't understand why I have a empty array in my output.</p>
  
  <p>I add the different configuration, share cw object and getMetricStatistics method details.</p>
  
  <p>I don't understand the method for response asynchronous call</p>
  
  <p>Thanks for you help</p>
  
  <pre><code>var arr = [
      { "region": "eu-west", "value": "http://****" },
      { "region": "eu-west", "value": "http://****" },
      { "region": "eu-west", "value": "http://****" },
      ] ;  
  
  var GlobalTab = [];
  
  var r=-1;
      while ( arr[++r] ) {
      var region= arr[r].region; //test
      var Value = arr[r].value ; //test
      cw.getMetricStatistics(params, function(err, data) {
          if (err){
              console.log(err, err.stack); // an error occurred
          }
          else {   
              var TabJSON = [];
              for(var i=0;i&lt;5;i++) {
                  TabJSON.push(data.Datapoints[i]);
              }
          GlobalTab.push(TabJSON);
          function foo(){
          return new Promise( (resolve, reject) =&gt; { 
          setTimeout ( function(){    
          resolve(GlobalTab)// 
          }, 1000 )
          })
          }
          }
      });
  }
  console.log(GlobalTab); //error empty array
  let bar ; 
  foo().then( res =&gt; {
  bar = res;
  console.log(bar) // 
  });
  </code></pre>
  
  <p>Expected result: </p>
  
  <pre><code>[[{Timestamp: 2019-01-15T08:26:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:32:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:26:00.000, Average: 200},
  {Timestamp: 2019-01-15T08:29:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:35:00.000Z, Average: 200}],
  [{Timestamp: 2019-01-15T08:26:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:32:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:26:00.000, Average: 200},
  {Timestamp: 2019-01-15T08:29:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:35:00.000Z, Average: 200}],
  [{Timestamp: 2019-01-15T08:26:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:32:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:26:00.000, Average: 200},
  {Timestamp: 2019-01-15T08:29:00.000Z, Average: 200},
  {Timestamp: 2019-01-15T08:35:00.000Z, Average: 200}]]
  </code></pre>