title: AWS .NET - Difference between SharedCredentialsFile and NetSDKCredentialsFile
body: <p>I was following the <a href="https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html" rel="nofollow noreferrer">AWS tutorials for .NET developers</a> and found out that it features the usage of both <code>SharedCredentialsFile</code> and <code>NetSDKCredentialsFile</code>. Is there any difference between those two APIs? In my code, they can be interchanged without any apparent difference:</p>
  
  <pre><code>    public CredentialProfile GetProfile(string profileName)
      {
          // Which one should I use?
          var sharedFile = new SharedCredentialsFile();
          //var sharedFile = new NetSDKCredentialsFile();
  
          if (!sharedFile.TryGetProfile(profileName, out var result))
          {
              var options = new CredentialProfileOptions
              {
                  AccessKey = Configuration.AccessKey,
                  SecretKey = Configuration.SecretKey
              };
  
              var profile = new CredentialProfile(profileName, options);
              profile.Region = RegionEndpoint.EUWest1;
              sharedFile .RegisterProfile(profile);
  
              result = profile;
          }
  
          return result;
      }
  </code></pre>
  
  <p>Is one of them obsolete? Is there a best practice to which one should be used? Or are they identical?</p>
  
  <p>Note, that I am developing on a Windows PC, but the app will run on a Linux server. Could this make any difference?</p>