title: NodeJS Failing to load in credentials file AWS
body: <p>This is what my code looks like:</p>
  
  <pre><code>'use strict';
  
  process.env.AWS_PROFILE
  
  // Load the AWS SDK for Node.js
  const AWS = require('aws-sdk');
  
  // Create EC2 service object
  var ec2 = new AWS.EC2({apiVersion: '2016-11-15'});
  
  // Load credentials and set region from JSON file
  AWS.config.loadFromPath('/Users/testuser/.aws/credentials');
  // Load in security group parameters
  const securityParams = require('./securityParams.json');
  
  module.exports = {
      //Exports creation of Security Groups
      CreateSecurityGroup: (req, res) =&gt; {
          ec2.createSecurityGroup(securityParams, function(err, data) {
              if (err) {
                  return (console.log("Error", err));
              }
              // Pass the Json as a parameter in this function
              ec2.authorizeSecurityGroupIngress(securityParams, function(err, data) {
                  if (err) {
                      res.serverError(err, err.stack);
                  } else {
                      res.ok(data);
                      console.log('Ingress Security Rules Created');
                  }
              })
              // Pass the Json as a parameter in this function
              ec2.authorizeSecurityGroupEgress(securityParams, function(err, data) {
                  if (err) {
                      res.serverError(err, err.stack);
                  } else {
                      res.ok(data);
                      console.log('Egress Security Rules Created');
                  }
              })
          })
      }
    }
  </code></pre>
  
  <p>I'm trying to have the script load configurations from two files; one aws credentials file, and one json. However its throwing errors on the credentials file which looks like this:</p>
  
  <pre><code>[default]
  aws_access_key_id=**************
  aws_secret_access_key**************
  </code></pre>
  
  <p>I'm not sure what I'm missing to get it to read the properties in correctly.</p>
  
  <p>Here is the error I'm seeing:</p>
  
  <pre><code>undefined:1
  [default]
   ^
  
  SyntaxError: Unexpected token d in JSON at position 1
      at JSON.parse (&lt;anonymous&gt;)
  </code></pre>