AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Constructs an instance for credentials stored in a profile with the specified name.

Namespace: Amazon.Runtime
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z

Syntax

C#
public StoredProfileAWSCredentials(
         String profileName,
         String profilesLocation
)
Parameters
profileName
Type: System.String

The profile name to search for credentials for

profilesLocation
Type: System.String

Optional; instructs the SDK to check for the profile in the shared credentials file at the specified location. If not set, the SDK will inspect its own credential store file first before attempting to locate a shared credential file using either the default location beneath the user's home profile folder or the location specified in the AWS_SHARED_CREDENTIALS_FILE environment variable.

Remarks

If credential materials cannot be read or are invalid due to missing data an InvalidDataException is thrown. If no credentials can be located with the specified profile name, an ArgumentException is thrown.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5