User guide

Topics
Using the SDK Store (p. 10)
Using a Credentials File (p. 10)
Using Credentials in an Application (p. 11)
Using the SDK Store
The preferred way to manage credentials for SDK for .NET applications is to add a profile to the SDK
Store for each set of credentials that you want to use in your applications.
The SDK Store can contain multiple profiles from any number of accounts.
You reference the profile by name in your application and the associated credentials are incorporated
at build time.
Your source files never contain literal credentials.
If you include a profile named default, the SDK for .NET will use that profile by default.
The credentials in the SDK store are encrypted, and the SDK Store is in the user's home directory,
which limits the risk of accidentally exposing your credentials.
The SDK Store also provides credentials to the AWS Tools for Windows PowerShell.
There are several ways to manage the profiles in the SDK Store.
The Toolkit for Visual Studio includes a graphical user interface for managing profiles.
For more information, see Setting Up the AWS Toolkit for Visual Studio.
You can manage your profiles from the command line by using the AWS Tools for Windows PowerShell.
For more information, see Using AWS Credentials.
You can manage your profiles programmatically by using the Amazon.Util.ProfileManager class.
The following example adds a new profile to the SDK Store.
Amazon.Util.ProfileManager.RegisterProfile(profileName,
accessKey, secretKey)
Using a Credentials File
You can also store profiles in a credentials file, which can also be used by the other AWS SDKS, the
AWS CLI, and AWS Tools for Windows PowerShell.To reduce the risk of accidentally exposing credentials,
the credentials file is stored separately from any projects, usually in the user's home folder. However, the
profiles are stored in plaintext, so a credentials file is not as secure as the SDK Store.
You can manage these profiles by using a text editor. The file is named credentials, and the default
location is under your user's home folder. For example, if your user name is awsuser, the credentials file
would be C:\users\awsuser\.aws\credentials.
Each profile has the following format:
Version v2.0.0
10
AWS SDK for .NET Developer Guide
Configuring AWS Credentials