My AWS profile in ~/.aws/credentials
contains session credentials created by STS.
[default]
aws_session_token=XXX
aws_access_key_id=XXX
aws_secret_access_key=XXX
I am trying to access these credentials using the AWS SDK Java v2
Using the DefaultCredentialsProvider
or ProfileCredentialsProvider
finds them, but the returned object is of type AwsCredentials
rather than AwsSessionCredentials
which doesn't include the session token, only the access key ID and secret access key.
Is there any way to retrieve the full session credentials?