private static AWSCredentials CreateCredentials(AWSOptions options)
{
if (options != null &&
!string.IsNullOrEmpty(options.Profile) &&
StoredProfileAWSCredentials.IsProfileKnown(options.Profile, options.ProfilesLocation))
{
return new StoredProfileAWSCredentials(options.Profile, options.ProfilesLocation);
}
return FallbackCredentialsFactory.GetCredentials();
}