title: Cannot read credentials from /.aws/credentials on local machine
body: <p>I have created a <code>credentials.txt</code> at <code>~/.aws/credentials.txt</code>
  I have added the credentials at <code>~/.aws/credentials.txt</code> as</p>
  <pre><code>[bogdan-ses-user]
  aws_access_key_id = ***
  aws_secret_access_key = ***
  </code></pre>
  <p><strong>Local Node JS server</strong></p>
  <pre><code>const express = require('express');
  const mysql = require('mysql');
  const app = express();
  
  // import entire SDK
  var AWS = require('aws-sdk');
  
  
  
      var credentials = new AWS.SharedIniFileCredentials({profile: 'bogdan-ses-user'});
      AWS.config.credentials = credentials;
      console.log(credentials);
  
  
  
      AWS.config.getCredentials(function(err) {
          if (err) {
              console.log(&quot;err comes hereeee&quot;);
              console.log(err.stack);
          }else{
  
              console.log('Access key: ', AWS.config.getCredentials.accessKeyId);
          }
      });
  
  app.listen(3000, function(){
      console.log('server has started');
  
  });
  </code></pre>
  <p><strong>Console Print out ERROR</strong>*</p>
  <blockquote>
  <p>(base) bogdanmac:ProjectDemo iliebogdanbarbulescu$ node app.js
  SharedIniFileCredentials {   expired: false,   expireTime: null,<br />
  refreshCallbacks: [],   accessKeyId: undefined,   sessionToken:
  undefined,   filename: undefined,   profile: 'bogdan-ses-user',<br />
  disableAssumeRole: false,   preferStaticCredentials: false,<br />
  tokenCodeFn: null,   httpOptions: null } err comes hereeee
  CredentialsError: Could not load credentials from
  SharedIniFileCredentials
  at Object.openSync (fs.js:462:3)
  at Object.readFileSync (fs.js:364:35)
  at Object.readFileSync (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/util.js:95:26)
  at IniLoader.parseFile (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/shared-ini/ini-loader.js:6:47)
  at IniLoader.loadFrom (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/shared-ini/ini-loader.js:56:30)
  at Object.getProfilesFromSharedConfig (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/util.js:965:39)
  at SharedIniFileCredentials.load (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js:96:31)
  at SharedIniFileCredentials.coalesceRefresh (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/credentials.js:205:12)
  at SharedIniFileCredentials.refresh (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js:168:10)
  at SharedIniFileCredentials.get (/Users/iliebogdanbarbulescu/Documents/ProjectDemo/node_modules/aws-sdk/lib/credentials.js:122:12)
  server has started successful connection done</p>
  </blockquote>