title: ProfileCredentialsProvider: java.lang.IllegalArgumentException: profile file cannot be null
body: <p>I'm trying to create <strong>AWSCredentials</strong> object by:</p>
  
  <pre><code>AWSCredentials cred =  new ProfileCredentialsProvider("Rafael_Nascimento").getCredentials();
  </code></pre>
  
  <p>The <strong>credentials</strong> file is located at <strong>~/.aws</strong> folder (Linux), it looks like:</p>
  
  <pre><code># Move this credentials file to (~/.aws/credentials)
  # after you fill in your access and secret keys in the default profile
  # WARNING: To avoid accidental leakage of your credentials,
  #          DO NOT keep this file in your source directory.
  [default]
  aws_access_key_id =  &lt;default_key&gt;
  aws_secret_access_key = &lt;default_secret_key&gt;
  [Rafael_Nascimento]
  aws_secret_access_key = &lt;secret_key_Rafael_Nascimento&gt;
  aws_access_key_id = &lt;key_Rafael_Nascimento&gt;
  </code></pre>
  
  <p>When I run the code I get on that line:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: profile file cannot be null
      at com.amazonaws.util.ValidationUtils.assertNotNull(ValidationUtils.java:37)
      at com.amazonaws.auth.profile.ProfilesConfigFile.&lt;init&gt;(ProfilesConfigFile.java:142)
      at com.amazonaws.auth.profile.ProfilesConfigFile.&lt;init&gt;(ProfilesConfigFile.java:133)
      at com.amazonaws.auth.profile.ProfilesConfigFile.&lt;init&gt;(ProfilesConfigFile.java:100)
      at com.amazonaws.auth.profile.ProfileCredentialsProvider.getCredentials(ProfileCredentialsProvider.java:135)
  </code></pre>
  
  <p>What could be wrong?
  Thanks!</p>