credential_source - AWS SDKs and Tools Shared Configuration and Credentials

credential_source

Used within Amazon EC2 instances or containers to specify where the SDK or development tool can find credentials that have permission to assume the role you specify with the role_arn parameter.

Details

Default value: None

Valid values:

You cannot specify both credential_source and source_profile in the same profile.

Ways to set this value

In the following example, apps that use the AWS SDKs or other AWS tools retrieve credentials for the instance's assigned role from the instance's metadata. The app or tool then uses those credentials to assume the role named my-role-name.

Location Supported Example
config file X
credential_source = Ec2InstanceMetadata role_arn = arn:aws:iam::123456789012:role/my-role-name
credentials file -
Environment variable -
CLI parameter -

Compatibility with AWS SDKS and tools