Open spg opened 5 years ago
@spg I don't think you're missing anything, this doesn't seem to be an issue with the credentials provider, but rather how SQL Workbench handles its environment. I also had this issue and was unable to get the AWS_REGION to propagate through to the credentials provider chain. I tried passing it from the JDBC connection string, the extended properties, workspace variables, and in my shell before launching SQL Workbench.
I ended up working around this issue by downloading the source code, modifying CustomIAMRoleAssumptionCredentialsProvider by adding a region variable, manually building the jar, then passing my desired region at the end of AWSCredentialsProviderArguments.
Hello Everyone,
can you share with us the final modified driver please ? i am not able to recompile the jar and use it, i tried a lot of commands to convert the CustomIAMRoleAssumptionCredentialsProvider file from .java to .class and recompile the jar after but without success :
C:\appli\compiler\com\amazonaws\custom\athena\jdbc>javac -cp ".;/appli/compiler/com/amazonaws/auth/*" CustomIAMRoleAssumptionCredentialsProvider.java CustomIAMRoleAssumptionCredentialsProvider.java:3: error: package com.amazonaws.auth does not exist
Thank you for your reply.in advance.
Hey, I've been following the steps in this tutorial (Scenario 2: Cross-account access). When I try to connect, I get the following error:
even if I set
AwsRegion=us-east-1
in the JDBC connection string, or even if I set theAWS_REGION=us-east-1
environment variable.Am I missing something?