aws / amazon-redshift-jdbc-driver

Redshift JDBC Driver. It supports JDBC 4.2 specification.
Apache License 2.0
61 stars 30 forks source link

Java property aws.secretAccessKey vs aws.secretKey #94

Open dreams-and-thoughts opened 1 year ago

dreams-and-thoughts commented 1 year ago

Driver version

2.1.0.17

Redshift version

8.0.2

Client Operating System

MacOS

JAVA/JVM version

openjdk 11.0.18

Problem description

  1. Expected behaviour:

Documentation states that the Java Property names are aws.accessKeyId aws.secretAccessKey & aws.sessionToken

https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html

  1. Actual behaviour:

Fails to connect.

  1. Error message/stack trace:

com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and roleSessionName, com.amazonaws.auth.profile.ProfileCredentialsProvider@41f464f6: profile file cannot be null, com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@7239a287: Failed to connect to service endpoint:

  1. Any other details that can be helpful:

Changing to aws.secretyKey (as stated in the error) is successful.

bhvkshah commented 1 year ago

Thank you for submitting this issue @dreams-and-thoughts ! I will take a look and get back to you when I have an update!