Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Fix credentials provider configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
laughingman7743 committed Jan 10, 2017
1 parent e92d7b1 commit fec9452
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyathenajdbc/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ def _build_driver_args(self, **kwargs):
props = jpype.java.util.Properties()
if self.credential_file:
props.setProperty('aws_credentials_provider_class',
'com.amazonaws.athena.jdbc.shaded.' +
'com.amazonaws.auth.PropertiesFileCredentialsProvider')
props.setProperty('aws_credentials_provider_arguments',
self.credential_file)
if self.token:
elif self.token:
props.setProperty('aws_credentials_provider_class',
'com.amazonaws.athena.jdbc.CustomSessionCredentialsProvider')
props.setProperty('aws_credentials_provider_arguments',
','.join([self.access_key, self.secret_key, self.token]))
'com.amazonaws.athena.jdbc.shaded.' +
'com.amazonaws.auth.InstanceProfileCredentialsProvider')
else:
props.setProperty('user', self.access_key)
props.setProperty('password', self.secret_key)
Expand Down

0 comments on commit fec9452

Please sign in to comment.