If ~/.aws/credentials only contains aws_access_key_id and aws_secret_access_key, but no aws_session_token, the test fails with the following stack trace:
Expected type to be Amazon.Runtime.SessionAWSCredentials, but found Amazon.Runtime.BasicAWSCredentials. at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message) at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message) at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args) at FluentAssertions.Types.TypeAssertions.Be(Type expected, String because, Object[] becauseArgs) at FluentAssertions.Primitives.ReferenceTypeAssertions`2.BeOfType(Type expectedType, String because, Object[] becauseArgs) at FluentAssertions.Primitives.ReferenceTypeAssertions`2.BeOfType[T](String because, Object[] becauseArgs) at MongoDB.Driver.Tests.Communication.Security.AwsAuthenticationTests.AwsSdk_should_support_all_required_handlers() in /Users/james/Dropbox/code/mongodb/mongo-csharp-driver/tests/MongoDB.Driver.Tests/Communication/Security/AwsAuthenticationTests.cs:line 102
This test should allow both BasicAWSCredentials and SessionAWSCredentials to be configured.