title: Missing credentials in config (AWS)
body: <p>I don't understand my error:</p>
  
  <p>"Missing credentials in config" </p>
  
  <p>You can see full error to the part 'Actual result'</p>
  
  <p>Normally, 
  The output show me :</p>
  
  <ul>
  <li>timestamp </li>
  <li>Average</li>
  <li>Unit </li>
  </ul>
  
  <p>I try to find the problem, sometimes i see 'AWS_SDK_LOAD' but don't understand...</p>
  
  <p>Can you help me please </p>
  
  <pre><code>var AWS = require('aws-sdk');
  
      AWS.config.region = 'eu-west-1';
      var cw = new AWS.CloudWatch({apiVersion: '2010-08-01'});
      var startDate = new Date();
      var endDate = new Date();
  
      startDate.setHours(startDate.getHours()-1);
  
      var params = {  
       StartTime: startDate,
        EndTime: endDate,
        Namespace: 'Lambda-Ping/HTTP', /* required */
        Period: 300, /* required */
         MetricName: 'StatusCode', /* required */
         Dimensions: [            
          {   
            Name: 'Endpoint', /* required */
            Value: 'https://****'
          },
          /* more items */
        ], 
        Statistics: [
          'Average'
          /* more items */
        ],
      };
  
          cw.getMetricStatistics(params, function(err, data) {
              if (err){
                      console.log(err, err.stack); // an error occurred
              } else {                                            
                  console.log(data);
              }
            });
  </code></pre>
  
  <p>Actual result:</p>
  
  <pre><code>{ Error: connect ENETUNREACH 169.254.169.254:80
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)
    message: 'Missing credentials in config',
    errno: 'ENETUNREACH',
    code: 'CredentialsError',
    syscall: 'connect',
    address: '169.254.169.254',
    port: 80,
    time: 2019-01-22T15:33:36.619Z,
    originalError:
     { message: 'Could not load credentials from any providers',
       errno: 'ENETUNREACH',
       code: 'CredentialsError',
       syscall: 'connect',
       address: '169.254.169.254',
       port: 80,
       time: 2019-01-22T15:33:36.619Z,
       originalError:
        { errno: 'ENETUNREACH',
          code: 'ENETUNREACH',
          syscall: 'connect',
          address: '169.254.169.254',
          port: 80,
          message: 'connect ENETUNREACH 169.254.169.254:80' } } } 'Error: connect ENETUNREACH 169.254.169.254:80\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)'
  </code></pre>