ProfilesConfigFile (AWS SDK for Java (original) (raw)

public class ProfilesConfigFile
extends Object
Loads the local AWS credential profiles from the standard location (~/.aws/credentials), which can be easily overridden through the AWS_CREDENTIAL_PROFILES_FILE environment variable or by specifying an alternate credentials file location through this class' constructor.
The AWS credentials file format allows you to specify multiple profiles, each with their own set of AWS security credentials:
[default]
aws_access_key_id=testAccessKey
aws_secret_access_key=testSecretKey
aws_session_token=testSessionToken
[test-user]
aws_access_key_id=testAccessKey
aws_secret_access_key=testSecretKey
aws_session_token=testSessionToken

These credential profiles allow you to share multiple sets of AWS security credentials between different tools such as the AWS SDK for Java and the AWS CLI.
For more information on setting up AWS credential profiles, see: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
See Also:
ProfileCredentialsProvider