Amazon configuration profile credentials
You can use credentials stored in an Amazon configuration profile by setting the
following connection parameters. Amazon configuration profiles are typically stored in
files in the ~/.aws directory). For information about Amazon
configuration profiles, see Use
profiles in the Amazon SDK for Java Developer Guide.
Credentials provider
The credentials provider that will be used to authenticate requests to Amazon. Set
the value of this parameter to ProfileCredentials.
| Parameter name | Alias | Parameter type | Default value | Value to use |
|---|---|---|---|---|
| CredentialsProvider | AWSCredentialsProviderClass (deprecated) | Required | none | ProfileCredentials |
Profile name
The name of the Amazon configuration profile whose credentials should be used to authenticate the request to Athena.
| Parameter name | Alias | Parameter type | Default value |
|---|---|---|---|
| ProfileName | none | Required | none |
Note
The profile name can also be specified as the value of the
CredentialsProviderArguments parameter, although this use is
deprecated.
Authenticating with an IAM Identity Center profile
Use an IAM Identity Center profile with the
ProfileCredentials provider to authenticate requests to Amazon. This
approach uses SSO-managed credentials instead of long-term access keys. The
following example shows the required entries in the
~/.aws/config file.
[profile athena-idc] sso_session = athena-idc-session sso_account_id = 111122223333 sso_role_name = AthenaQueryRole region = us-east-1 [sso-session athena-idc-session] sso_start_url = https://example.awsapps.com/start sso_region = us-east-1 sso_registration_scopes = sso:account:access
Before opening the JDBC connection, sign in to the profile. For example, use
aws sso login --profile athena-idc. Then configure the JDBC
connection with the following parameters.
CredentialsProvider=ProfileCredentials; ProfileName=athena-idc;